comparison src/command.rs @ 15:e6dc51066703

cargo clippy
author AnaTofuZ <anatofuz@gmail.com>
date Sun, 01 Nov 2020 12:52:13 +0900
parents 56e9763abeef
children 1da4937628be
comparison
equal deleted inserted replaced
14:06b9390774dd 15:e6dc51066703
9 } 9 }
10 } 10 }
11 11
12 pub fn start_command(user_name: &'static str, vm_name: String) { 12 pub fn start_command(user_name: &'static str, vm_name: String) {
13 let vm_name = match vm_name.parse::<u8>() { 13 let vm_name = match vm_name.parse::<u8>() {
14 Ok(_) => String::from(format!("{}-{}", user_name, vm_name)), 14 Ok(_) => format!("{}-{}", user_name, vm_name),
15 Err(_) => vm_name, 15 Err(_) => vm_name,
16 }; 16 };
17 17
18 let vm_name = if vm_name.starts_with(user_name) { 18 let vm_name = if vm_name.starts_with(user_name) {
19 vm_name 19 vm_name