Skip to content

Commit

Permalink
Clarify panic message for too-big shift operations on BitSlices
Browse files Browse the repository at this point in the history
  • Loading branch information
rbeard0330 authored and myrrlyn committed Jul 1, 2022
1 parent e1d59dc commit ad5dd00
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ where
let len = self.len();
assert!(
by < len,
"cannot shift a bit-slice by more than its length: {} > {}",
"shift must be less than the length of the bit-slice: {} >= {}",
by,
len,
);
Expand Down Expand Up @@ -1508,7 +1508,7 @@ where
let len = self.len();
assert!(
by < len,
"cannot shift a bit-slice by more than its length: {} > {}",
"shift must be less than the length of the bit-slice: {} >= {}",
by,
len,
);
Expand Down

0 comments on commit ad5dd00

Please sign in to comment.