Skip to content

Commit 752b2a1

Browse files
authored
Revert change to assertion message
1 parent 88fc4fb commit 752b2a1

File tree

1 file changed

+1
-5
lines changed
  • library/alloc/src/collections/vec_deque

1 file changed

+1
-5
lines changed

library/alloc/src/collections/vec_deque/mod.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2102,11 +2102,7 @@ impl<T, A: Allocator> VecDeque<T, A> {
21022102
#[track_caller]
21032103
#[must_use = "if you don't need a reference to the value, use VecDeque::insert instead"]
21042104
pub fn insert_mut(&mut self, index: usize, value: T) -> &mut T {
2105-
assert!(
2106-
index <= self.len,
2107-
"insertion index (is {index}) should be <= len (is {})",
2108-
self.len()
2109-
);
2105+
assert!(index <= self.len(), "index out of bounds");
21102106

21112107
if self.is_full() {
21122108
self.grow();

0 commit comments

Comments
 (0)