mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-17 17:10:28 +00:00
Simplify code
changelog: skip
This commit is contained in:
parent
860e069d4d
commit
e33959a888
3 changed files with 18 additions and 39 deletions
|
@ -102,8 +102,9 @@ impl CommentKind {
|
|||
kind
|
||||
}
|
||||
|
||||
fn prefix(&self) -> &'static str {
|
||||
let &(prefix, _) = CommentKind::BY_PREFIX.iter().find(|(_, kind)| kind == self).unwrap();
|
||||
pub fn prefix(&self) -> &'static str {
|
||||
let &(prefix, _) =
|
||||
CommentKind::BY_PREFIX.iter().rev().find(|(_, kind)| kind == self).unwrap();
|
||||
prefix
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue