-
Notifications
You must be signed in to change notification settings - Fork 240
Add --partition flag
#3852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add --partition flag
#3852
Conversation
| total: usize, | ||
| } | ||
|
|
||
| #[allow(dead_code)] // TODO: Removed in later PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't really matter here but except is safer than allow because it will fail if the condition (dead_code in this case) is not met
| #[allow(dead_code)] // TODO: Removed in later PRs | |
| #[except(dead_code)] // TODO: Removed in later PRs |
| impl Partition { | ||
| #[must_use] | ||
| pub fn index(&self) -> usize { | ||
| self.index | ||
| } | ||
|
|
||
| #[must_use] | ||
| pub fn total(&self) -> usize { | ||
| self.total | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could allow just accessing this by making these pub.
You can disallow creating struct instances with pub fields by adding this attribute to it https://doc.rust-lang.org/reference/attributes/type_system.html#the-non_exhaustive-attribute if that's what you wanted to prevent.
Towards #3548
Stack:
PartitionMessage#3853--partitionflag #3852 ⬅Introduced changes
Add
--partitionflag tosnforgeChecklist
CHANGELOG.md