Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AldaronLau committed Sep 3, 2024
1 parent bd55e27 commit d89948e
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,19 @@ pub fn langs() -> Result<impl Iterator<Item = Language>> {
let langs = langs
.split(';')
.map(ToString::to_string)
.collect::<Vec<_>>();
.filter_map(|lang| {
let lang = lang
.split_terminator('.')
.next()
.unwrap_or_default()
.replace(|x| ['_', '-'].contains(&x), "/");

Ok(langs.into_iter().filter_map(|lang| {
let lang = lang
.split_terminator('.')
.next()
.unwrap_or_default()
.replace(|x| ['_', '-'].contains(&x), "/");
if lang == "C" {
return None;
}

if lang == "C" {
return None;
}
Some(Language::__(Box::new(lang)))
});

Some(Language::__(Box::new(lang)))
}))
Ok(langs.collect::<Vec<_>>().into_iter())
}

0 comments on commit d89948e

Please sign in to comment.