mirror of
https://github.com/nushell/nushell.git
synced 2024-11-22 00:13:21 +01:00
Pass the borrow instead of clone. (#1986)
This commit is contained in:
parent
29ea29261d
commit
831111edec
@ -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 New Issue
Block a user