Minor touchups to variables prog

cat-town
Dan Buch 3 years ago
parent ed83cd6b64
commit 8fb44f13ef
Signed by: meatballhat
GPG Key ID: 9685130D8B763EA7

@ -37,7 +37,12 @@ fn main() {
fib_n(n)
}
"rx" => redefine_x(),
"help" | _ => show_help(),
"help" => show_help(),
_ => {
show_help();
eprintln!("ERROR: missing sub-command");
process::exit(1);
}
}
}
@ -58,7 +63,7 @@ fn redefine_x() {
println!("The value of x is: {}", x);
}
fn temp_convert(to_convert: &String) {
fn temp_convert(to_convert: &str) {
let to_convert = to_convert.to_lowercase();
if to_convert.ends_with("c") {
let c: f32 = to_convert

Loading…
Cancel
Save