Skip to content

Rename NextState::set_if_neq to set_if_different to resolve clashing#24676

Open
mansiverma897993 wants to merge 1 commit into
bevyengine:mainfrom
mansiverma897993:fix-nextstate-set-if-neq-clash
Open

Rename NextState::set_if_neq to set_if_different to resolve clashing#24676
mansiverma897993 wants to merge 1 commit into
bevyengine:mainfrom
mansiverma897993:fix-nextstate-set-if-neq-clash

Conversation

@mansiverma897993

Copy link
Copy Markdown

Fixes #24655 by renaming NextState::set_if_neq to set_if_different to resolve clashing.

@kfc35 kfc35 added C-Bug An unexpected or incorrect behavior A-States App-level states machines labels Jun 21, 2026
@kfc35 kfc35 requested a review from mnmaita June 21, 2026 18:17
@kfc35 kfc35 added D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 21, 2026
@alice-i-cecile alice-i-cecile added the M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide label Jun 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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 alice-i-cecile left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Agreed that this needs renaming. Needs a migration guide though.

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Jun 21, 2026

@mnmaita mnmaita left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me (minus the missing migration guide as stated before). Thanks a lot!

///
/// This will run the state transition schedules [`OnEnter`](crate::state::OnEnter) and [`OnExit`](crate::state::OnExit).
/// If you want to skip those schedules for the same where we are transitioning to the same state, use [`set_if_neq`](Self::set_if_neq) instead.
/// If you want to skip those schedules when transitioning to the same state, use [`set_if_different`](Self::set_if_different) instead.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Much simpler :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-States App-level states machines C-Bug An unexpected or incorrect behavior D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NextState::set_if_neq() name clashing

4 participants