Skip to content

Commit

Permalink
chore: cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Jun 22, 2022
1 parent 3da7b2f commit 866000b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libflux/flux-core/src/semantic/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ fn get_attribute<'a>(comments: impl IntoIterator<Item = &'a str>, attr: &str) ->
comments.into_iter().find_map(|comment| {
// Remove the comment and any preceding whitespace
let comment = comment.trim_start_matches("//").trim_start();
if comment.starts_with("@") {
let mut iter = comment[1..].splitn(2, char::is_whitespace);
if let Some(content) = comment.strip_prefix('@') {
let mut iter = content.splitn(2, char::is_whitespace);
let name = iter.next().unwrap();
if name == attr {
Some(iter.next().unwrap_or("").trim())
Expand Down

0 comments on commit 866000b

Please sign in to comment.