mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Simplify
This commit is contained in:
parent
bfb187aacd
commit
5374ebbf36
12 changed files with 62 additions and 53 deletions
|
@ -7,11 +7,7 @@ pub fn is_rust_fence(s: &str) -> bool {
|
|||
let mut seen_rust_tags = false;
|
||||
let mut seen_other_tags = false;
|
||||
|
||||
let tokens = s
|
||||
.trim()
|
||||
.split(|c| c == ',' || c == ' ' || c == '\t')
|
||||
.map(str::trim)
|
||||
.filter(|t| !t.is_empty());
|
||||
let tokens = s.trim().split([',', ' ', '\t']).map(str::trim).filter(|t| !t.is_empty());
|
||||
|
||||
for token in tokens {
|
||||
match token {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue