Skip to content

Commit 0924f17

Browse files
uucore/buf_copy: simplify unix-specific imports
Co-authored-by: Sylvestre Ledru <[email protected]>
1 parent 148c531 commit 0924f17

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/uucore/src/lib/features/buf_copy.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,17 @@ mod tests {
2828
use tempfile::tempdir;
2929

3030
#[cfg(unix)]
31-
use crate::pipes;
32-
#[cfg(unix)]
33-
use std::fs::OpenOptions;
34-
#[cfg(unix)]
35-
use std::{
36-
io::{Seek, SeekFrom},
37-
thread,
31+
use {
32+
crate::pipes,
33+
std::fs::OpenOptions,
34+
std::{
35+
io::{Seek, SeekFrom},
36+
thread,
37+
},
3838
};
3939

4040
#[cfg(any(target_os = "linux", target_os = "android"))]
41-
use nix::unistd;
42-
#[cfg(any(target_os = "linux", target_os = "android"))]
43-
use std::os::fd::AsRawFd;
41+
use {nix::unistd, std::os::fd::AsRawFd};
4442

4543
use std::io::{Read, Write};
4644

0 commit comments

Comments
 (0)