Skip to content

ExampleSystemBuilder: use idiomatic getter/setter names#9796

Open
jgallagher wants to merge 5 commits intojohn/planning-input-pruneablefrom
john/example-system-idiomatic
Open

ExampleSystemBuilder: use idiomatic getter/setter names#9796
jgallagher wants to merge 5 commits intojohn/planning-input-pruneablefrom
john/example-system-idiomatic

Conversation

@jgallagher
Copy link
Contributor

Stacked on top of #9730, where I was touching this code and the naming bugged me.

Copy link
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

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

Thank you! This was bugging me, too.

Copy link
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! It's been bugging me too

/// Currently, this value can be anywhere between 0 and 5. (More can be
/// added in the future if necessary.)
pub fn nsleds(mut self, nsleds: usize) -> Self {
pub fn set_nsleds(mut self, nsleds: usize) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

They're owned builder methods so I'd call them with_*.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh yeah good call. Will tweak momentarily.

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.

3 participants