Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/menu.rs')
-rw-r--r--helix-term/src/ui/menu.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index c0e60b33..f9f038e7 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -241,9 +241,9 @@ impl<T: Item> Menu<T> {
}
impl<T: Item + PartialEq> Menu<T> {
- pub fn replace_option(&mut self, old_option: T, new_option: T) {
+ pub fn replace_option(&mut self, old_option: &T, new_option: T) {
for option in &mut self.options {
- if old_option == *option {
+ if old_option == option {
*option = new_option;
break;
}