mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 12:36:35 +03:00
deny(unsafe_op_in_unsafe_fn) in rustc_data_structures
This commit is contained in:
@@ -13,7 +13,8 @@
|
||||
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) }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user