Skip to content

Commit 90f6a7a

Browse files
cakebakernonontb
authored andcommitted
yes: move import to the other imports (uutils#12153)
1 parent 117e6e1 commit 90f6a7a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/uu/yes/src/yes.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ use clap::{Arg, ArgAction, Command, builder::ValueParser};
99
use std::ffi::OsString;
1010
use std::io::{self, Write};
1111
use uucore::error::{UResult, USimpleError, strip_errno};
12-
use uucore::format_usage;
13-
use uucore::translate;
12+
#[cfg(any(target_os = "linux", target_os = "android"))]
13+
use uucore::pipes::MAX_ROOTLESS_PIPE_SIZE;
14+
use uucore::{format_usage, translate};
1415

1516
#[cfg(any(target_os = "linux", target_os = "android"))]
1617
const PAGE_SIZE: usize = 4096;
1718
#[cfg(any(target_os = "linux", target_os = "android"))]
18-
use uucore::pipes::MAX_ROOTLESS_PIPE_SIZE;
19-
#[cfg(any(target_os = "linux", target_os = "android"))]
2019
const BUF_SIZE: usize = MAX_ROOTLESS_PIPE_SIZE;
2120
// it's possible that using a smaller or larger buffer might provide better performance
2221
#[cfg(not(any(target_os = "linux", target_os = "android")))]
@@ -116,6 +115,7 @@ pub fn exec(mut bytes: Vec<u8>) -> io::Result<()> {
116115
#[cfg(any(target_os = "linux", target_os = "android"))]
117116
pub fn exec(mut bytes: Vec<u8>) -> io::Result<()> {
118117
use uucore::pipes::{pipe, splice, tee};
118+
119119
let aligned = PAGE_SIZE.is_multiple_of(bytes.len());
120120
repeat_content_to_capacity(&mut bytes);
121121
let bytes = bytes.as_slice();

0 commit comments

Comments
 (0)