aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-05 10:24:58 +0100
committerGitHub <[email protected]>2020-07-05 10:24:58 +0100
commit8b0983e89ad9a28b142eccf3755a8c9aaeb37852 (patch)
treeb6c640e47b5d0dc9d663dd643c83d94e1d0a85b9
parent6b74e27ba06d1f15ffca22020d72f0c170ec9680 (diff)
parent569504938e6d6b11eb3e35b562197d12167d301b (diff)
Merge #5228
5228: Fix typo r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
-rw-r--r--crates/rust-analyzer/src/config.rs10
-rw-r--r--crates/rust-analyzer/src/handlers.rs2
2 files changed, 6 insertions, 6 deletions
diff --git a/crates/rust-analyzer/src/config.rs b/crates/rust-analyzer/src/config.rs
index 0c7c36716..e42e41a41 100644
--- a/crates/rust-analyzer/src/config.rs
+++ b/crates/rust-analyzer/src/config.rs
@@ -67,20 +67,20 @@ impl From<ProjectJson> for LinkedProject {
67pub struct LensConfig { 67pub struct LensConfig {
68 pub run: bool, 68 pub run: bool,
69 pub debug: bool, 69 pub debug: bool,
70 pub impementations: bool, 70 pub implementations: bool,
71} 71}
72 72
73impl Default for LensConfig { 73impl Default for LensConfig {
74 fn default() -> Self { 74 fn default() -> Self {
75 Self { run: true, debug: true, impementations: true } 75 Self { run: true, debug: true, implementations: true }
76 } 76 }
77} 77}
78 78
79impl LensConfig { 79impl LensConfig {
80 pub const NO_LENS: LensConfig = Self { run: false, debug: false, impementations: false }; 80 pub const NO_LENS: LensConfig = Self { run: false, debug: false, implementations: false };
81 81
82 pub fn any(&self) -> bool { 82 pub fn any(&self) -> bool {
83 self.impementations || self.runnable() 83 self.implementations || self.runnable()
84 } 84 }
85 85
86 pub fn none(&self) -> bool { 86 pub fn none(&self) -> bool {
@@ -272,7 +272,7 @@ impl Config {
272 if lens_enabled { 272 if lens_enabled {
273 set(value, "/lens/run", &mut self.lens.run); 273 set(value, "/lens/run", &mut self.lens.run);
274 set(value, "/lens/debug", &mut self.lens.debug); 274 set(value, "/lens/debug", &mut self.lens.debug);
275 set(value, "/lens/implementations", &mut self.lens.impementations); 275 set(value, "/lens/implementations", &mut self.lens.implementations);
276 } else { 276 } else {
277 self.lens = LensConfig::NO_LENS; 277 self.lens = LensConfig::NO_LENS;
278 } 278 }
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 3cb532b62..cc83a1406 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -865,7 +865,7 @@ pub(crate) fn handle_code_lens(
865 } 865 }
866 } 866 }
867 867
868 if snap.config.lens.impementations { 868 if snap.config.lens.implementations {
869 // Handle impls 869 // Handle impls
870 lenses.extend( 870 lenses.extend(
871 snap.analysis 871 snap.analysis