Skip to content

Commit f6e51fa

Browse files
authored
Fix new Rust-1.62 lints (#1866)
1 parent 4c7ae6b commit f6e51fa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

crates/libs/bindgen/src/gen.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ impl<'a> Gen<'a> {
303303

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

331331
let mut features = cfg_features(cfg, self.namespace);
332332
if self.windows_extern {
333-
features = features.into_iter().filter(|f| !f.starts_with("Windows.")).collect();
333+
features.retain(|f| !f.starts_with("Windows."));
334334
}
335335

336336
let features = match features.len() {
@@ -355,7 +355,7 @@ impl<'a> Gen<'a> {
355355
quote! {}
356356
} else {
357357
if self.windows_extern {
358-
features = features.into_iter().filter(|f| !f.starts_with("Windows.")).collect();
358+
features.retain(|f| !f.starts_with("Windows."));
359359
}
360360
match features.len() {
361361
0 => quote! {},

crates/libs/implement/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ impl ImplementAttributes {
278278
}
279279

280280
namespace.push_str(&input.ident.to_string());
281-
self.walk_implement(&*input.tree, namespace)?;
281+
self.walk_implement(&input.tree, namespace)?;
282282
}
283283
UseTree2::Name(_) => {
284284
self.implement.push(tree.to_element_type(namespace)?);

0 commit comments

Comments
 (0)