|
|
|
@ -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
|
|
|
|
|