chore: clean

This commit is contained in:
iff 2024-12-07 00:20:00 +01:00
parent 92d14cdf20
commit c10f08a0c2
5 changed files with 20 additions and 21 deletions

View file

@ -266,11 +266,7 @@ pub fn expand_alias(map: &HashMap<String, String>, command: &str) -> Option<Stri
} else {
(command, "")
};
if let Some(expand) = map.get(command) {
Some(format!("{} {}", expand, args))
} else {
None
}
map.get(command).map(|expand| format!("{} {}", expand, args))
}
pub fn expand_alias_multiline(map: &HashMap<String, String>, command: &str) -> Option<String> {