From 2a78114639d471a6f1b73e73ba2081993acab0d4 Mon Sep 17 00:00:00 2001 From: Michael Sloan Date: Fri, 17 Jan 2025 13:46:09 -0700 Subject: [PATCH] Keymap error message simplification Good suggestion from Conrad! --- crates/settings/src/keymap_file.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/crates/settings/src/keymap_file.rs b/crates/settings/src/keymap_file.rs index fccb878be75880..fe2ff65fce3b08 100644 --- a/crates/settings/src/keymap_file.rs +++ b/crates/settings/src/keymap_file.rs @@ -152,8 +152,6 @@ impl KeymapFile { // Accumulate errors in order to support partial load of user keymap in the presence of // errors in context and binding parsing. let mut errors = Vec::new(); - let mut error_count = 0; - let mut missing_bindings_field = false; let mut key_bindings = Vec::new(); for KeymapSection { @@ -169,7 +167,6 @@ impl KeymapFile { match KeyBindingContextPredicate::parse(context) { Ok(context_predicate) => Some(context_predicate.into()), Err(err) => { - error_count += bindings.as_ref().map_or(0, |bindings| bindings.len()); // Leading space is to separate from the message indicating which section // the error occurred in. errors.push(( @@ -213,7 +210,6 @@ impl KeymapFile { key_bindings.push(key_binding); } Err(err) => { - error_count += 1; write!( section_errors, "\n\n - In binding {}, {err}", @@ -223,8 +219,6 @@ impl KeymapFile { } } } - } else { - missing_bindings_field = true; } if !section_errors.is_empty() {