diff --git a/src/hugetlb.rs b/src/hugetlb.rs index f3520d8..6771bd0 100644 --- a/src/hugetlb.rs +++ b/src/hugetlb.rs @@ -130,7 +130,6 @@ pub enum HugePage { /// The largest huge-page size on the system Largest, /// Use a callback function to select the huge-page size (*in kB*) from an *ordered* (lowest to highest) enumeration of all available on the system. - //TODO: Remember to order the HUGEPAGE_LOCATION parsing results before passing them to this! Selected(for<'r> fn (&'r [usize]) -> Option<&'r usize>), } diff --git a/src/lib.rs b/src/lib.rs index 19c068e..6b656d1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -122,7 +122,7 @@ impl MappedFile { /// # Panics /// If `mmap()` succeeds, but returns an invalid address (e.g. 0) #[inline] - pub fn new(file: T, len: usize, perm: Perm, flags: Flags) -> io::Result + pub fn new(file: T, len: usize, perm: Perm, flags: impl MapFlags) -> io::Result { Self::try_new(file, len, perm, flags).map_err(Into::into) } @@ -177,8 +177,6 @@ impl MappedFile { } impl MappedFile { - - #[inline(always)] fn raw_parts(&self) -> (*mut u8, usize) { @@ -298,7 +296,9 @@ impl MappedFile { } } -/// Error returned when mapping operation fails +/// Error returned when mapping operation fails. +/// +/// Also returns the value passed in. pub struct TryNewError { error: Box,