Skip to content

Commit

Permalink
Change assertion to debug assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
jhpratt authored and Gankra committed Dec 3, 2023
1 parent a014955 commit 6d0df29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ impl<T> ThinVec<T> {
if self.is_singleton() {
// A prerequisite of `Vec::set_len` is that `new_len` must be
// less than or equal to capacity(). The same applies here.
assert!(len == 0, "invalid set_len({}) on empty ThinVec", len);
debug_assert!(len == 0, "invalid set_len({}) on empty ThinVec", len);
} else {
self.header_mut().set_len(len)
}
Expand Down

0 comments on commit 6d0df29

Please sign in to comment.