diff --git a/Cargo.toml b/Cargo.toml index 85d0920c..80efd50f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,11 @@ [package] -authors = ["JT ", "The Nushell Project Developers"] +authors = ["The Nushell Project Developers"] description = "A readline-like crate for CLI text input" edition = "2021" license = "MIT" name = "reedline" repository = "https://github.com/nushell/reedline" -rust-version = "1.62.1" +rust-version = "1.63.0" version = "0.32.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/core_editor/clip_buffer.rs b/src/core_editor/clip_buffer.rs index 8297a3bb..0bb17e72 100644 --- a/src/core_editor/clip_buffer.rs +++ b/src/core_editor/clip_buffer.rs @@ -6,10 +6,12 @@ pub trait Clipboard: Send { fn get(&mut self) -> (String, ClipboardMode); + #[allow(dead_code)] fn clear(&mut self) { self.set("", ClipboardMode::Normal); } + #[allow(dead_code)] fn len(&mut self) -> usize { self.get().0.len() } @@ -41,7 +43,7 @@ impl LocalClipboard { impl Clipboard for LocalClipboard { fn set(&mut self, content: &str, mode: ClipboardMode) { - self.content = content.to_owned(); + content.clone_into(&mut self.content); self.mode = mode; } diff --git a/src/menu/description_menu.rs b/src/menu/description_menu.rs index 9954b4b8..95197b7a 100644 --- a/src/menu/description_menu.rs +++ b/src/menu/description_menu.rs @@ -589,7 +589,7 @@ impl Menu for DescriptionMenu { .examples .get(example_index) .expect("the example index is always checked"); - suggestion.value = example.clone(); + suggestion.value.clone_from(example); } replace_in_buffer(Some(suggestion), editor); }