mirror of
https://github.com/nushell/nushell.git
synced 2024-11-25 18:03:51 +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 {
|
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 New Issue
Block a user