mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
rust: pin-init: internal: remove redundant #[pin] filtering
The `generate_projections` and `generate_the_pin_data` function already receive filtered field lists, they do not need to filter out `#[pin]` again. Reviewed-by: Benno Lossin <lossin@kernel.org> Link: https://patch.msgid.link/20260428-pin-init-sync-v1-6-07f9bd3859fb@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
This commit is contained in:
parent
5edf8ac281
commit
c64c793d9a
|
|
@ -258,8 +258,6 @@ fn generate_projections(
|
|||
..
|
||||
},
|
||||
)| {
|
||||
let mut attrs = attrs.clone();
|
||||
attrs.retain(|a| !a.path().is_ident("pin"));
|
||||
let mut no_doc_attrs = attrs.clone();
|
||||
no_doc_attrs.retain(|a| !a.path().is_ident("doc"));
|
||||
let ident = ident
|
||||
|
|
@ -360,8 +358,6 @@ fn handle_field(
|
|||
struct_ident: &Ident,
|
||||
pinned: bool,
|
||||
) -> TokenStream {
|
||||
let mut attrs = attrs.clone();
|
||||
attrs.retain(|a| !a.path().is_ident("pin"));
|
||||
let ident = ident
|
||||
.as_ref()
|
||||
.expect("only structs with named fields are supported");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user