Prepare, configure, and manage Firecracker microVMs in seconds!
virtualization linux microvm firecracker

run cargo fmt

+2 -10
+2 -10
crates/firecracker-up/src/cmd/cp.rs
··· 34 let key_path = get_private_key_path()?; 35 36 let scp_args = if from.contains(':') { 37 - let remote_path = format!( 38 - "root@{}:{}", 39 - guest_ip, 40 - from.splitn(2, ':').nth(1).unwrap() 41 - ); 42 vec!["-r", remote_path.as_str(), to] 43 .iter() 44 .map(|s| s.to_string()) 45 .collect::<Vec<String>>() 46 } else { 47 - let remote_path = format!( 48 - "root@{}:{}", 49 - guest_ip, 50 - to.splitn(2, ':').nth(1).unwrap() 51 - ); 52 vec!["-r", from, remote_path.as_str()] 53 .iter() 54 .map(|s| s.to_string())
··· 34 let key_path = get_private_key_path()?; 35 36 let scp_args = if from.contains(':') { 37 + let remote_path = format!("root@{}:{}", guest_ip, from.splitn(2, ':').nth(1).unwrap()); 38 vec!["-r", remote_path.as_str(), to] 39 .iter() 40 .map(|s| s.to_string()) 41 .collect::<Vec<String>>() 42 } else { 43 + let remote_path = format!("root@{}:{}", guest_ip, to.splitn(2, ':').nth(1).unwrap()); 44 vec!["-r", from, remote_path.as_str()] 45 .iter() 46 .map(|s| s.to_string())