warning about E
This commit is contained in:
parent
408ecacc16
commit
8112d5c2fd
@ -120,7 +120,16 @@ pub fn test_func(function_string: &str) -> Option<String> {
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
return match var_names_not_x.len() {
|
||||
1 => Some(format!("Error: invalid variable: {}", var_names_not_x[0])),
|
||||
1 => {
|
||||
let var_name = &var_names_not_x[0];
|
||||
if var_name == "e" {
|
||||
Some(String::from(
|
||||
"If trying to use Euler's number, please use an uppercase E",
|
||||
))
|
||||
} else {
|
||||
Some(format!("Error: invalid variable: {}", var_name))
|
||||
}
|
||||
}
|
||||
_ => Some(format!("Error: invalid variables: {:?}", var_names_not_x)),
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user