Skip to content

Commit fbe0591

Browse files
committed
Mark OwnedSlice::{deref, borrow} as #[inline]
1 parent 2733c29 commit fbe0591

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_data_structures/src/owned_slice.rs

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ where
9292
impl Deref for OwnedSlice {
9393
type Target = [u8];
9494

95+
#[inline]
9596
fn deref(&self) -> &[u8] {
9697
// Safety:
9798
// `self.bytes` is valid per the construction in `slice_owned`
@@ -101,6 +102,7 @@ impl Deref for OwnedSlice {
101102
}
102103

103104
impl Borrow<[u8]> for OwnedSlice {
105+
#[inline]
104106
fn borrow(&self) -> &[u8] {
105107
self
106108
}

0 commit comments

Comments
 (0)