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 <kjeremy@gmail.com>
This commit is contained in:
bors[bot] 2020-01-14 18:56:57 +00:00 committed by GitHub
commit eceafa65d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,11 +84,7 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
f: impl FnOnce(&mut AssistBuilder),
) -> Option<Assist> {
let label = AssistLabel { label: label.into(), id };
assert_eq!(
label.label.chars().nth(0).and_then(|c| Some(c.is_uppercase())).unwrap(),
true,
"First character should be uppercase"
);
assert!(label.label.chars().nth(0).unwrap().is_uppercase());
let assist = if self.should_compute_edit {
let action = {