diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-12-10 04:50:42 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-12-10 04:50:42 -0500 |
commit | 75774fa13f9dbd02838a3e0984bd4d0dfbaca9d8 (patch) | |
tree | 0d7c906890de1987bb1412424c201766f05c84d5 /src/builtins.rs | |
parent | 8647c6ec2767c06b9612284dbf22bea0ee944f47 (diff) | |
download | nbsh-75774fa13f9dbd02838a3e0984bd4d0dfbaca9d8.tar.gz nbsh-75774fa13f9dbd02838a3e0984bd4d0dfbaca9d8.zip |
clippy
Diffstat (limited to 'src/builtins.rs')
-rw-r--r-- | src/builtins.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/builtins.rs b/src/builtins.rs index 225ef5b..8494c7e 100644 --- a/src/builtins.rs +++ b/src/builtins.rs @@ -4,9 +4,12 @@ pub fn is(exe: &str) -> bool { pub fn run(exe: &str, args: &[String]) -> u8 { match exe { - "cd" => { - impls::cd(args.iter().map(|s| s.as_ref()).next().unwrap_or("")) - } + "cd" => impls::cd( + args.iter() + .map(std::convert::AsRef::as_ref) + .next() + .unwrap_or(""), + ), _ => unreachable!(), } } |