diff src/main.rs @ 36:91a99ff9c4c5

String to &str
author AnaTofuZ <anatofuz@gmail.com>
date Sun, 22 Nov 2020 11:03:09 +0900
parents 1c3b6b6ee0b1
children 0f966575a56a
line wrap: on
line diff
--- a/src/main.rs	Sun Nov 22 10:11:02 2020 +0900
+++ b/src/main.rs	Sun Nov 22 11:03:09 2020 +0900
@@ -122,7 +122,7 @@
 
         SubCommand::Start(arg) => {
             user::set_root_id();
-            command::start(&user_name, arg.name);
+            command::start(&user_name, &arg.name);
         }
 
         SubCommand::Define(arg) => {
@@ -132,52 +132,52 @@
                 gid,
                 name: user_name,
             };
-            command::define(&user, arg.name);
+            command::define(&user, &arg.name);
         }
 
         SubCommand::Shutdown(arg) => {
             user::set_root_id();
-            command::shutdown(&user_name, arg.name);
+            command::shutdown(&user_name, &arg.name);
         }
 
         SubCommand::Console(arg) => {
             user::set_root_id();
-            command::console(&user_name, arg.name);
+            command::console(&user_name, &arg.name);
         }
 
         SubCommand::Destroy(arg) => {
             user::set_root_id();
-            command::destroy(&user_name, arg.name);
+            command::destroy(&user_name, &arg.name);
         }
 
         SubCommand::Vncdisplay(arg) => {
             user::set_root_id();
-            command::vncdisplay(&user_name, arg.name);
+            command::vncdisplay(&user_name, &arg.name);
         }
 
         SubCommand::Ttyconsole(arg) => {
             user::set_root_id();
-            command::ttyconsole(&user_name, arg.name);
+            command::ttyconsole(&user_name, &arg.name);
         }
 
         SubCommand::Dumpxml(arg) => {
             user::set_root_id();
-            command::dumpxml(&user_name, arg.name);
+            command::dumpxml(&user_name, &arg.name);
         }
 
         SubCommand::Undefine(arg) => {
             user::set_root_id();
-            command::undefine(&user_name, arg.name);
+            command::undefine(&user_name, &arg.name);
         }
 
         SubCommand::Domiflist(arg) => {
             user::set_root_id();
-            command::domiflist(&user_name, arg.name);
+            command::domiflist(&user_name, &arg.name);
         }
 
         SubCommand::Dominfo(arg) => {
             user::set_root_id();
-            command::dominfo(&user_name, arg.name);
+            command::dominfo(&user_name, &arg.name);
         }
 
         SubCommand::Templates(_) => {