Skip to content

fix: correct error message in validate_leafs - "need > 2" to "need >= 2"#80

Open
sueun-dev wants to merge 1 commit intoolivmath:mainfrom
sueun-dev:fix/validate-leafs-error-message
Open

fix: correct error message in validate_leafs - "need > 2" to "need >= 2"#80
sueun-dev wants to merge 1 commit intoolivmath:mainfrom
sueun-dev:fix/validate-leafs-error-message

Conversation

@sueun-dev
Copy link

The validate_leafs function raises an exception when size < 2 (i.e., when there are fewer than 2 leaves). However, the error message says "need > 2", which is incorrect and misleading.

The condition size < 2 means the minimum valid size is 2 (i.e., size >= 2 is required). The error message should say "need >= 2", not "need > 2". The current message incorrectly implies that even 2 leaves would be invalid.

This fix corrects the error message to accurately reflect the validation logic.

The validate_leafs function raises an exception when `size < 2` (i.e., when there are fewer than 2 leaves). However, the error message says "need > 2", which is incorrect and misleading.

The condition `size < 2` means the minimum valid size is 2 (i.e., size >= 2 is required). The error message should say "need >= 2", not "need > 2". The current message incorrectly implies that even 2 leaves would be invalid.

This fix corrects the error message to accurately reflect the validation logic.
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.

1 participant