aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 9d4125f..d8d1dd6 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -10,7 +10,9 @@ pub type Result<T> = std::result::Result<T, Error>;
pub fn parse(line: &str) -> Result<(String, Vec<String>)> {
// TODO
- let mut tokens = line.split_whitespace().map(|s| s.to_string());
+ let mut tokens = line
+ .split_whitespace()
+ .map(std::string::ToString::to_string);
let cmd = tokens.next().context(CommandRequired)?;
Ok((cmd, tokens.collect()))
}