Skip to content

Commit 013d4dd

Browse files
committed
Avoid unsafe code in Bytes::to_mut
1 parent 1501209 commit 013d4dd

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

engine/src/lhs_types/bytes.rs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,7 @@ impl<'a> Bytes<'a> {
4141
}
4242
match self {
4343
Self::Owned(b) => b,
44-
Self::Borrowed(_) => {
45-
cfg_if::cfg_if! {
46-
if #[cfg(debug_assertions)] {
47-
unreachable!()
48-
} else {
49-
std::hint::unreachable_unchecked()
50-
}
51-
}
52-
}
44+
Self::Borrowed(_) => unreachable!(),
5345
}
5446
}
5547

0 commit comments

Comments
 (0)