Pass the borrow instead of clone. (#1986)

This commit is contained in:
utam0k 2020-06-16 02:35:24 +09:00 committed by GitHub
parent 29ea29261d
commit 831111edec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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| {