Skip to content

Commit

Permalink
Fix new Rust-1.62 lints (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Jul 2, 2022
1 parent 4c7ae6b commit f6e51fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/libs/bindgen/src/gen.rs
Expand Up @@ -303,7 +303,7 @@ impl<'a> Gen<'a> {

let mut features = cfg_features(cfg, self.namespace);
if self.windows_extern {
features = features.into_iter().filter(|f| !f.starts_with("Windows.")).collect();
features.retain(|f| !f.starts_with("Windows."));
}
for features in features {
write!(tokens, r#", `\"{}\"`"#, to_feature(features)).unwrap();
Expand All @@ -330,7 +330,7 @@ impl<'a> Gen<'a> {

let mut features = cfg_features(cfg, self.namespace);
if self.windows_extern {
features = features.into_iter().filter(|f| !f.starts_with("Windows.")).collect();
features.retain(|f| !f.starts_with("Windows."));
}

let features = match features.len() {
Expand All @@ -355,7 +355,7 @@ impl<'a> Gen<'a> {
quote! {}
} else {
if self.windows_extern {
features = features.into_iter().filter(|f| !f.starts_with("Windows.")).collect();
features.retain(|f| !f.starts_with("Windows."));
}
match features.len() {
0 => quote! {},
Expand Down
2 changes: 1 addition & 1 deletion crates/libs/implement/src/lib.rs
Expand Up @@ -278,7 +278,7 @@ impl ImplementAttributes {
}

namespace.push_str(&input.ident.to_string());
self.walk_implement(&*input.tree, namespace)?;
self.walk_implement(&input.tree, namespace)?;
}
UseTree2::Name(_) => {
self.implement.push(tree.to_element_type(namespace)?);
Expand Down

0 comments on commit f6e51fa

Please sign in to comment.