mirror of
https://github.com/nushell/nushell
synced 2025-01-15 14:44:14 +00:00
Pass the borrow instead of clone. (#1986)
This commit is contained in:
parent
29ea29261d
commit
831111edec
1 changed files with 2 additions and 2 deletions
|
@ -676,13 +676,13 @@ pub async fn cli(
|
|||
|
||||
match line {
|
||||
LineResult::Success(line) => {
|
||||
rl.add_history_entry(line.clone());
|
||||
rl.add_history_entry(&line);
|
||||
let _ = rl.save_history(&History::path());
|
||||
context.maybe_print_errors(Text::from(line));
|
||||
}
|
||||
|
||||
LineResult::Error(line, err) => {
|
||||
rl.add_history_entry(line.clone());
|
||||
rl.add_history_entry(&line);
|
||||
let _ = rl.save_history(&History::path());
|
||||
|
||||
context.with_host(|_host| {
|
||||
|
|
Loading…
Reference in a new issue