diff options
Diffstat (limited to 'src/builtins.rs')
-rw-r--r-- | src/builtins.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/builtins.rs b/src/builtins.rs index 8494c7e..e8f87da 100644 --- a/src/builtins.rs +++ b/src/builtins.rs @@ -2,10 +2,10 @@ pub fn is(exe: &str) -> bool { matches!(exe, "cd") } -pub fn run(exe: &str, args: &[String]) -> u8 { +pub fn run<'a>(exe: &str, args: impl IntoIterator<Item = &'a str>) -> u8 { match exe { "cd" => impls::cd( - args.iter() + args.into_iter() .map(std::convert::AsRef::as_ref) .next() .unwrap_or(""), |