refactor(get_command): spawn rustyline instance from main()
This commit is contained in:
parent
3d4ab2e2e4
commit
fe66326956
4 changed files with 19 additions and 16 deletions
|
|
@ -22,11 +22,7 @@ pub fn parse(file: String, input: String) -> Result<Vec<Command>, Vec<CommandPar
|
|||
crate::tokens::TokenData::EndOfFile => (),
|
||||
}
|
||||
}
|
||||
if errs.is_empty() {
|
||||
Ok(cmds)
|
||||
} else {
|
||||
Err(errs)
|
||||
}
|
||||
if errs.is_empty() { Ok(cmds) } else { Err(errs) }
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue