Rename NextState::set_if_neq to set_if_different to resolve clashing#24676
Conversation
|
It looks like your PR is a breaking change, but you didn't provide a migration guide. Please review the instructions for writing migration guides, then expand or revise the content in the migration guides directory to reflect your changes. |
alice-i-cecile
left a comment
There was a problem hiding this comment.
Agreed that this needs renaming. Needs a migration guide though.
mnmaita
left a comment
There was a problem hiding this comment.
Looks good to me (minus the missing migration guide as stated before). Thanks a lot!
| /// Like [`set`](Self::set), but will not run any state transition schedules if the target state is the same as the current one. | ||
| /// If [`set`](Self::set) has already been called in the same frame with the same state, the transition schedules will be run anyways. | ||
| pub fn set_if_neq(&mut self, state: S) { | ||
| pub fn set_if_different(&mut self, state: S) { |
There was a problem hiding this comment.
Still needs a deprecated set_if_neq method that wraps this for migration ease :)
There was a problem hiding this comment.
@alice-i-cecile done now check at once lemme know if further changes required!!
|
Lovely, thank you :) Needs formatting then this is good to go. I wanted to be extra paranoid about the migration because I didn't want it quietly falling back to the wrong version. |
|
@alice-i-cecile Thanks for the review and feedback! I'll run the formatting pass and push the changes shortly. |
|
@alice-i-cecile @mnmaita done with all test lemme know if any other changes still required!! |
Fixes #24655 by renaming NextState::set_if_neq to set_if_different to resolve clashing.