We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5795fe3 commit dfa303bCopy full SHA for dfa303b
src/map.rs
@@ -499,9 +499,10 @@ where
499
// Handle out-of-bounds indices with panic as this is an internal error in get_index_of.
500
for idx in indices {
501
let idx = idx?;
502
- if idx >= len {
503
- panic!("Index is out of range! Got '{idx}' but length is '{len}'")
504
- }
+ debug_assert!(
+ idx < len,
+ "Index is out of range! Got '{idx}' but length is '{len}'"
505
+ );
506
}
507
let indices = indices.map(Option::unwrap);
508
let entries = self.get_many_index_mut(indices)?;
0 commit comments