diff --git a/src/bin/fish.rs b/src/bin/fish.rs index daa156bfa..c535ea64d 100644 --- a/src/bin/fish.rs +++ b/src/bin/fish.rs @@ -119,8 +119,7 @@ fn print_rusage_self() { let usage = getrusage(UsageWho::RUSAGE_SELF).unwrap(); let rss_kb = if cfg!(apple) { // Macs use bytes, - // Source: commit b6555a0dc462f669e1b5a370c3efae0f5948a1ef - // The docs at https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getrusage.2.html say otherwise. + // even though docs at https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/getrusage.2.html say otherwise. usage.max_rss() / 1024 } else { usage.max_rss() diff --git a/src/env/environment_impl.rs b/src/env/environment_impl.rs index 1cb9e2981..609c3f190 100644 --- a/src/env/environment_impl.rs +++ b/src/env/environment_impl.rs @@ -80,9 +80,8 @@ fn set_umask(list_val: &[WString]) -> EnvStackSetResult { return EnvStackSetResult::Invalid; } // Do not actually create a umask variable. On env_stack_t::get() it will be calculated. - // We already checked that `mask` is in range 0..=0o777, so it does not really matter which - // variant of `Mode::from_bits` we use. - umask(Mode::from_bits_truncate(mask as libc::mode_t)); + // We already checked that `mask` is in range 0..=0o777. + umask(Mode::from_bits(mask as libc::mode_t).unwrap()); EnvStackSetResult::Ok }