mirror of
https://github.com/nushell/nushell
synced 2025-01-15 22:54:16 +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 {
|
match line {
|
||||||
LineResult::Success(line) => {
|
LineResult::Success(line) => {
|
||||||
rl.add_history_entry(line.clone());
|
rl.add_history_entry(&line);
|
||||||
let _ = rl.save_history(&History::path());
|
let _ = rl.save_history(&History::path());
|
||||||
context.maybe_print_errors(Text::from(line));
|
context.maybe_print_errors(Text::from(line));
|
||||||
}
|
}
|
||||||
|
|
||||||
LineResult::Error(line, err) => {
|
LineResult::Error(line, err) => {
|
||||||
rl.add_history_entry(line.clone());
|
rl.add_history_entry(&line);
|
||||||
let _ = rl.save_history(&History::path());
|
let _ = rl.save_history(&History::path());
|
||||||
|
|
||||||
context.with_host(|_host| {
|
context.with_host(|_host| {
|
||||||
|
|
Loading…
Reference in a new issue