diff --git a/benches/bench_set.rs b/benches/bench_set.rs index d59e3e57..58abc956 100644 --- a/benches/bench_set.rs +++ b/benches/bench_set.rs @@ -9,7 +9,7 @@ fn set_new(b: &mut Bencher<'_>) { const LEN: usize = 100_000; // Create Python objects up-front, so that the benchmark doesn't need to include // the cost of allocating LEN Python integers - let elements: Vec = (0..LEN).into_iter().map(|i| i.into_py(py)).collect(); + let elements: Vec = (0..LEN).map(|i| i.into_py(py)).collect(); b.iter(|| { let pool = unsafe { py.new_pool() }; PySet::new(py, &elements).unwrap(); diff --git a/pyo3-macros-backend/src/frompyobject.rs b/pyo3-macros-backend/src/frompyobject.rs index ba365efe..831aed25 100644 --- a/pyo3-macros-backend/src/frompyobject.rs +++ b/pyo3-macros-backend/src/frompyobject.rs @@ -278,7 +278,6 @@ impl<'a> Container<'a> { let self_ty = &self.path; let struct_name = &self.name(); let field_idents: Vec<_> = (0..struct_fields.len()) - .into_iter() .map(|i| format_ident!("arg{}", i)) .collect(); let fields = struct_fields.iter().zip(&field_idents).enumerate().map(|(index, (field, ident))| { diff --git a/pyo3-macros-backend/src/pymethod.rs b/pyo3-macros-backend/src/pymethod.rs index fa81c6d4..3807a1fd 100644 --- a/pyo3-macros-backend/src/pymethod.rs +++ b/pyo3-macros-backend/src/pymethod.rs @@ -1109,7 +1109,6 @@ impl SlotDef { let py = syn::Ident::new("_py", Span::call_site()); let arg_types: &Vec<_> = &arguments.iter().map(|arg| arg.ffi_type()).collect(); let arg_idents: &Vec<_> = &(0..arguments.len()) - .into_iter() .map(|i| format_ident!("arg{}", i)) .collect(); let wrapper_ident = format_ident!("__pymethod_{}__", method_name); @@ -1220,7 +1219,6 @@ impl SlotFragmentDef { let py = syn::Ident::new("_py", Span::call_site()); let arg_types: &Vec<_> = &arguments.iter().map(|arg| arg.ffi_type()).collect(); let arg_idents: &Vec<_> = &(0..arguments.len()) - .into_iter() .map(|i| format_ident!("arg{}", i)) .collect(); let body = generate_method_body(cls, spec, &py, arguments, *extract_error_mode, None)?;