chore: clippy fix rust style

This commit is contained in:
quake
2022-07-20 21:38:50 +09:00
parent 8d91e7eb63
commit a0c07631e2
6 changed files with 9 additions and 13 deletions

View File

@@ -102,8 +102,8 @@ fn map_std_type_name(name: &str, shorthands: bool) -> &str {
};
}
if name.starts_with("rhai::") {
map_std_type_name(&name[6..], shorthands)
if let Some(stripped) = name.strip_prefix("rhai::") {
map_std_type_name(stripped, shorthands)
} else {
name
}