Skip to content

Commit 652f3ca

Browse files
Fix assertion message (#216)
- [x] I agree to follow the project's [code of conduct](https://github.com/georust/geo/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `rstar/CHANGELOG.md` if knowledge of this change could be valuable to users. --- The assertion requires MAX_SIZE >= 4 while the message requires MAX_SIZE > 4, so the message should be changed into "MAX_SIZE too small. Must be at least 4.".
1 parent 5363825 commit 652f3ca

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

rstar/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Made `RStar` methods take `Point` and `Envelope` as owned values where it makes sense ([PR](https://github.com/georust/rstar/pull/189))
1111
- Fix Clippy warning (surfaced in Rust 1.89) related to lifetime elision
1212
- MSRV is now 1.68 (2023-03-09)
13+
- Fix incorrect assertion message in `verify_parameters` of `rstar/src/params.rs`
1314

1415

1516
# 0.12.2

rstar/src/params.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ pub trait InsertionStrategy {
8888
}
8989

9090
pub fn verify_parameters<T: RTreeObject, P: RTreeParams>() {
91-
assert!(
92-
P::MAX_SIZE >= 4,
93-
"MAX_SIZE too small. Must be larger than 4."
94-
);
91+
assert!(P::MAX_SIZE >= 4, "MAX_SIZE too small. Must be at least 4.");
9592

9693
assert!(P::MIN_SIZE > 0, "MIN_SIZE must be at least 1",);
9794
let max_min_size = (P::MAX_SIZE + 1) / 2;

0 commit comments

Comments
 (0)