Skip to content

Commit f5b65e0

Browse files
committed
Restore windows as_slice method
1 parent b479bf2 commit f5b65e0

File tree

1 file changed

+1
-1
lines changed
  • library/std/src/sys/pal/windows

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/windows/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ impl<'a> IoSlice<'a> {
3535
}
3636

3737
#[inline]
38-
pub fn as_slice(&self) -> &[u8] {
38+
pub const fn as_slice(&self) -> &'a [u8] {
3939
unsafe { slice::from_raw_parts(self.vec.buf, self.vec.len as usize) }
4040
}
4141
}

0 commit comments

Comments
 (0)