Skip to content

Conversation

@franciszekjob
Copy link
Contributor

@franciszekjob franciszekjob commented Oct 22, 2025

Towards #3548

Stack:

Introduced changes

Add --partition flag to snforge

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@franciszekjob franciszekjob marked this pull request as ready for review October 22, 2025 18:19
@franciszekjob franciszekjob requested a review from a team as a code owner October 22, 2025 18:19
total: usize,
}

#[allow(dead_code)] // TODO: Removed in later PRs
Copy link
Member

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

Suggested change
#[allow(dead_code)] // TODO: Removed in later PRs
#[except(dead_code)] // TODO: Removed in later PRs

Comment on lines +11 to +21
impl Partition {
#[must_use]
pub fn index(&self) -> usize {
self.index
}

#[must_use]
pub fn total(&self) -> usize {
self.total
}
}
Copy link
Member

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.

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