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") .filter(|ele| ele != &"x")
.collect::<Vec<&String>>(); .collect::<Vec<&String>>();
return Err(match var_names_not_x.len() { return Err(format!(
1 => { "Error: invalid variable{}",
format!("Error: invalid variable: {}", var_names_not_x[0]) 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; } pub fn is_mobile() -> bool { return *IS_MOBILE; }
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
pub const fn is_mobile() -> bool { return false; } pub const fn is_mobile() -> bool { false }