Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
- try to avoid warnings when compiled on Windows
  • Loading branch information
Byron committed Jan 13, 2025
1 parent 61174e5 commit 4d5e656
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/tools/tests/umask.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
use std::fs::File;
use std::io::{BufRead, BufReader};

use bstr::ByteSlice;

#[test]
#[cfg(unix)]
#[cfg_attr(not(target_os = "linux"), ignore = "The test itself uses /proc")]
fn umask() {
use std::fs::File;
use std::io::{BufRead, BufReader};

use bstr::ByteSlice;
// Check against the umask obtained via a less portable but also completely safe method.
let less_portable = BufReader::new(File::open("/proc/self/status").expect("can open"))
.split(b'\n')
Expand Down

0 comments on commit 4d5e656

Please sign in to comment.