Skip to content

Conversation

@crawford
Copy link
Contributor

@crawford crawford commented Jan 10, 2021

This builds on 633e7c2 (#409), adding the #[non_exhaustive] attribute to applicable struct definitions and de-duplicates and (hopefully) simplifies a few if-else blocks. I've also verified that these changes don't result in larger binaries.

This builds on 633e7c2, adding the #[non_exhaustive] attribute to
applicable struct definitions.
This de-duplicates and (hopefully) simplifies a few if-else blocks. The
others were given an exception because I thought they were more readable
as is. I've verified that these changes don't result in larger binaries.
@crawford crawford changed the title Use #[non_exhaustive] on structs as well Various cleanup Jan 10, 2021
@crawford
Copy link
Contributor Author

cc @dlrobertson

Copy link
Member

@Dirbaio Dirbaio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

@Dirbaio Dirbaio merged commit 43df239 into smoltcp-rs:master Jan 16, 2021
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