File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -455,9 +455,10 @@ mod tests {
455
455
456
456
type MmapRegion = super :: MmapRegion < ( ) > ;
457
457
458
- // Adding a helper method to extract the errno within an Error::Mmap(e), or return a
459
- // distinctive value when the error is represented by another variant.
460
458
impl Error {
459
+ /// Helper method to extract the errno within an
460
+ /// `Error::Mmap(e)`. Returns `i32::MIN` if `self` is any
461
+ /// other variant.
461
462
pub fn raw_os_error ( & self ) -> i32 {
462
463
match self {
463
464
Error :: Mmap ( e) => e. raw_os_error ( ) . unwrap ( ) ,
Original file line number Diff line number Diff line change @@ -1063,6 +1063,7 @@ mod tests {
1063
1063
}
1064
1064
1065
1065
impl MmapRegion {
1066
+ /// Create an `MmapRegion` with specified `size` at GuestAdress(0)
1066
1067
pub fn new ( size : usize ) -> Result < Self > {
1067
1068
let range = MmapRange :: new_unix ( size, None , GuestAddress ( 0 ) ) ;
1068
1069
Self :: from_range ( range)
You can’t perform that action at this time.
0 commit comments