vm-allocator: fix a clippy warning on missing safety comments

There is already a comment but Clippy isn't happy with its form.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2022-11-16 17:12:55 +00:00 committed by Liu Wei
parent d274fe9cb8
commit 3d08a0fba9

View File

@ -19,7 +19,7 @@ use libc::{sysconf, _SC_PAGESIZE};
/// Safe wrapper for `sysconf(_SC_PAGESIZE)`. /// Safe wrapper for `sysconf(_SC_PAGESIZE)`.
#[inline(always)] #[inline(always)]
fn pagesize() -> usize { fn pagesize() -> usize {
// Trivially safe // SAFETY: FFI call. Trivially safe.
unsafe { sysconf(_SC_PAGESIZE) as usize } unsafe { sysconf(_SC_PAGESIZE) as usize }
} }