Skip to content

internal: pin_data: add struct to record field info#152

Merged
nbdd0121 merged 2 commits into
mainfrom
dev/field_info
May 11, 2026
Merged

internal: pin_data: add struct to record field info#152
nbdd0121 merged 2 commits into
mainfrom
dev/field_info

Conversation

@nbdd0121
Copy link
Copy Markdown
Member

Introduce FieldInfo struct to encapsulate field and other relevant data, instead of carrying a pair of (pinned, field) in all places. This allows us to add more information to the struct in the future.

@mqqz I've split this up from your #113 as something that I'm happy to take now (the move of all other functions in the commit is less clear that to me that they're beneficial). Please let me know if you're happy with this smaller version which I've kept your name as author.

nbdd0121 and others added 2 commits May 11, 2026 13:01
`handle_field` is currently a function, which precludes it from referencing
things in the scope of the parent function. Given that it's only called
once, inline its contents to the closure that invokes it instead, so it can
directly reference `struct_name` without having to pass in as argument.

Signed-off-by: Gary Guo <gary@garyguo.net>
Introduce `FieldInfo` struct to encapsulate field and other relevant data,
instead of carrying a pair of `(pinned, field)` in all places. This allows
us to add more information to the struct in the future.

Signed-off-by: Mohamad Alsadhan <mo@sdhn.cc>
Co-developed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Gary Guo <gary@garyguo.net>
@mqqz
Copy link
Copy Markdown
Contributor

mqqz commented May 11, 2026

Thanks Gary!

@nbdd0121 nbdd0121 merged commit 0a1f2a3 into main May 11, 2026
22 checks passed
@nbdd0121 nbdd0121 deleted the dev/field_info branch May 11, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants