Skip to content

Commit 93c94c4

Browse files
committed
Make clippy happy
1 parent 69a68c2 commit 93c94c4

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/lib.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,13 +174,12 @@ pub fn get_umask() -> Mode {
174174
we've mostly escaped that particular circle of UNIX hell on modern systems.
175175
*/
176176

177-
if let Ok(status) = fs::read_to_string("/proc/self/status") {
178-
if let Some(umask) = status
177+
if let Ok(status) = fs::read_to_string("/proc/self/status")
178+
&& let Some(umask) = status
179179
.lines()
180180
.find_map(|line| RawMode::from_str_radix(line.strip_prefix("Umask:")?.trim(), 8).ok())
181-
{
182-
return Mode::from_raw_mode(umask);
183-
}
181+
{
182+
return Mode::from_raw_mode(umask);
184183
}
185184

186185
// Fallback method with a possible race condition

0 commit comments

Comments
 (0)