deny(unsafe_op_in_unsafe_fn)
in rustc_data_structures
This commit is contained in:
parent
d7f9e81650
commit
f79df7d2a4
4 changed files with 106 additions and 98 deletions
|
@ -13,7 +13,8 @@ pub struct Mmap(Vec<u8>);
|
|||
impl Mmap {
|
||||
#[inline]
|
||||
pub unsafe fn map(file: File) -> io::Result<Self> {
|
||||
memmap2::Mmap::map(&file).map(Mmap)
|
||||
// Safety: this is in fact not safe.
|
||||
unsafe { memmap2::Mmap::map(&file).map(Mmap) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue