From 99af9db3b22f139b31a56b6a1f54612aacb73b6f Mon Sep 17 00:00:00 2001 From: Jiayi Zhao Date: Wed, 20 Feb 2019 21:09:52 -0500 Subject: clean up some code --- src/commands/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/commands/mod.rs') diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 09fbfb7..f6e0e7f 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -74,8 +74,8 @@ pub fn from_args(command: &str, args: Option<&Vec>) -> Option { if let Some(args) = args { match wordexp::wordexp(args[0].as_str(), 0) { - Ok(exp_strs) => { - if let Some(exp_str) = exp_strs.into_iter().next() { + Ok(mut exp_strs) => { + if let Some(exp_str) = exp_strs.next() { let path = PathBuf::from(exp_str); return Some(Box::new(self::ChangeDirectory::new(path))); } -- cgit v1.2.3