more cleanup

This commit is contained in:
Simon Gardling 2022-05-04 23:57:17 -04:00
parent 243135b3dc
commit 7a109d5638
2 changed files with 7 additions and 8 deletions

View File

@ -41,14 +41,13 @@ impl BackingFunction {
.filter(|ele| ele != &"x")
.collect::<Vec<&String>>();
return Err(match var_names_not_x.len() {
1 => {
format!("Error: invalid variable: {}", var_names_not_x[0])
return Err(format!(
"Error: invalid variable{}",
match var_names_not_x.len() {
1 => String::from(": ") + var_names_not_x[0].as_str(),
_ => format!("s: {:?}", var_names_not_x),
}
_ => {
format!("Error: invalid variables: {:?}", var_names_not_x)
}
});
));
}
}
}

View File

@ -92,4 +92,4 @@ lazy_static::lazy_static! {
pub fn is_mobile() -> bool { return *IS_MOBILE; }
#[cfg(not(target_arch = "wasm32"))]
pub const fn is_mobile() -> bool { return false; }
pub const fn is_mobile() -> bool { false }