From 831111edec221fddb2549f079170c3451e06a8cb Mon Sep 17 00:00:00 2001 From: utam0k Date: Tue, 16 Jun 2020 02:35:24 +0900 Subject: [PATCH] Pass the borrow instead of clone. (#1986) --- crates/nu-cli/src/cli.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/nu-cli/src/cli.rs b/crates/nu-cli/src/cli.rs index 92d0b05509..14b423c454 100644 --- a/crates/nu-cli/src/cli.rs +++ b/crates/nu-cli/src/cli.rs @@ -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| {