Skip to content

Derive Clone, Debug on useful objects#287

Merged
IsaacWoods merged 1 commit intorust-osdev:mainfrom
martin-hughes:extra-derives
Apr 23, 2026
Merged

Derive Clone, Debug on useful objects#287
IsaacWoods merged 1 commit intorust-osdev:mainfrom
martin-hughes:extra-derives

Conversation

@martin-hughes
Copy link
Copy Markdown
Contributor

In my project I found it would be useful to have an explicit Clone for PciConfigRegions. Looking through the platform structs, I also saw NumaInfo looked like it would benefit from Clone.

Plus since neither struct is self-referential, I added a Debug derive because I find it useful surprisingly often!

Any objections?

@IsaacWoods
Copy link
Copy Markdown
Member

Yep, seems reasonable!

I think at some point I wanted to write a nice Display implementation for the NumaInfo distance matrix, but never got round to it. I think I was unconvinced if that belonged in the library or whether downstream users would want to do their own visualisations.

@IsaacWoods IsaacWoods merged commit 0a91e3f into rust-osdev:main Apr 23, 2026
5 checks passed
@martin-hughes martin-hughes deleted the extra-derives branch April 24, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants