diff options
Diffstat (limited to 'vendor/time-macros/src/helpers/string.rs')
-rw-r--r-- | vendor/time-macros/src/helpers/string.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/time-macros/src/helpers/string.rs b/vendor/time-macros/src/helpers/string.rs index fa3780f5e..6b478f60d 100644 --- a/vendor/time-macros/src/helpers/string.rs +++ b/vendor/time-macros/src/helpers/string.rs @@ -57,7 +57,7 @@ fn parse_lit_str_cooked(mut s: &str) -> Vec<u8> { continue 'outer; } }, - _ => unreachable!("invalid escape"), + _ => bug!("invalid escape"), } } b'\r' => { @@ -120,7 +120,7 @@ fn parse_lit_byte_str_cooked(mut v: &[u8]) -> Vec<u8> { continue 'outer; } }, - _ => unreachable!("invalid escape"), + _ => bug!("invalid escape"), } } b'\r' => { @@ -151,7 +151,7 @@ where b'0'..=b'9' => b1 - b'0', b'a'..=b'f' => 10 + (b1 - b'a'), b'A'..=b'F' => 10 + (b1 - b'A'), - _ => unreachable!("invalid hex escape"), + _ => bug!("invalid hex escape"), }; (ch, &s[2..]) } @@ -172,7 +172,7 @@ fn backslash_u(mut s: &str) -> (char, &str) { continue; } b'}' if digits != 0 => break, - _ => unreachable!("invalid unicode escape"), + _ => bug!("invalid unicode escape"), }; ch *= 0x10; ch += u32::from(digit); |