Skip to content

Fix assertion message#279

Merged
mat-1 merged 1 commit intoazalea-rs:mainfrom
YichiZhang0613:fix_assertion
Nov 17, 2025
Merged

Fix assertion message#279
mat-1 merged 1 commit intoazalea-rs:mainfrom
YichiZhang0613:fix_assertion

Conversation

@YichiZhang0613
Copy link
Contributor

In azalea/azalea-core/src/bitset.rs, the assertion's message "range.start must be greater than range.end" is wrong. It should be "range.start must be less than or equal to range.end" instead.

/// # Panics
    ///
    /// Panics if the range is invalid (start > end).
    pub fn clear(&mut self, range: Range<usize>) {
        assert!(
            range.start <= range.end,
            "Range ends before it starts; {} must be greater than {}",
            range.start,
            range.end
        );
...

Copy link
Collaborator

@mat-1 mat-1 left a comment

Choose a reason for hiding this comment

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

Thanks :)

@mat-1 mat-1 merged commit f464f01 into azalea-rs:main Nov 17, 2025
1 check failed
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

Comments