diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-01-14 18:56:57 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-01-14 18:56:57 +0000 |
commit | eceafa65d574a60491ecc887450f8500a381fc24 (patch) | |
tree | 6bd60551b6339bff563d45829ce99f91fa964adb /crates/ra_assists | |
parent | b2ed130ffd9c79de26249a1dfb2a8312d6af12b3 (diff) | |
parent | e89ade38092a77f402698cb8a9dc0caaa5d4befa (diff) |
Merge #2845
2845: Cleanup assert r=kjeremy a=kjeremy
Re: https://github.com/rust-analyzer/rust-analyzer/pull/2841#discussion_r366510725
thanks @bjorn3!
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/assist_ctx.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs index 1b626faaa..1a65b5dc0 100644 --- a/crates/ra_assists/src/assist_ctx.rs +++ b/crates/ra_assists/src/assist_ctx.rs | |||
@@ -84,11 +84,7 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> { | |||
84 | f: impl FnOnce(&mut AssistBuilder), | 84 | f: impl FnOnce(&mut AssistBuilder), |
85 | ) -> Option<Assist> { | 85 | ) -> Option<Assist> { |
86 | let label = AssistLabel { label: label.into(), id }; | 86 | let label = AssistLabel { label: label.into(), id }; |
87 | assert_eq!( | 87 | assert!(label.label.chars().nth(0).unwrap().is_uppercase()); |
88 | label.label.chars().nth(0).and_then(|c| Some(c.is_uppercase())).unwrap(), | ||
89 | true, | ||
90 | "First character should be uppercase" | ||
91 | ); | ||
92 | 88 | ||
93 | let assist = if self.should_compute_edit { | 89 | let assist = if self.should_compute_edit { |
94 | let action = { | 90 | let action = { |