Skip to content

Commit

Permalink
chore: apply clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oberrich committed Feb 6, 2025
1 parent d2b5b19 commit ed8fc84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions bindgen-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn should_overwrite_expected() -> bool {
return true;
}
assert!(
var == "0" || var == "",
var == "0" || var.is_empty(),
"Invalid value of BINDGEN_OVERWRITE_EXPECTED"
);
}
Expand Down Expand Up @@ -57,7 +57,7 @@ fn error_diff_mismatch(
if let Some(var) = env::var_os("BINDGEN_TESTS_DIFFTOOL") {
//usecase: var = "meld" -> You can hand check differences
let Some(std::path::Component::Normal(name)) =
filename.components().last()
filename.components().next_back()
else {
panic!("Why is the header variable so weird?")
};
Expand Down Expand Up @@ -187,7 +187,7 @@ fn compare_generated_header(
header.display(),
looked_at,
),
};
}

let (builder, roundtrip_builder) = builder.into_builder(check_roundtrip)?;

Expand Down
2 changes: 1 addition & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ fn format_attribute_tokens(attrs: &[TokenStream]) -> Vec<String> {
comments.push(format!(
"{}{}",
if block_comment_count > 0 { " " } else { "" },
cleaned.to_string()
cleaned
));
} else if trimmed.starts_with('#') {
attrs.push(line.into());
Expand Down

0 comments on commit ed8fc84

Please sign in to comment.