Skip to content

Commit 7905732

Browse files
oech3cakebaker
authored andcommitted
yes: remove unnecessary cfg
1 parent 0f45d9d commit 7905732

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/uu/yes/src/yes.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use uucore::error::{UResult, USimpleError, strip_errno};
1313
use uucore::pipes::MAX_ROOTLESS_PIPE_SIZE;
1414
use uucore::{format_usage, translate};
1515

16-
#[cfg(any(target_os = "linux", target_os = "android"))]
17-
const PAGE_SIZE: usize = 4096;
1816
#[cfg(any(target_os = "linux", target_os = "android"))]
1917
const BUF_SIZE: usize = MAX_ROOTLESS_PIPE_SIZE;
2018
// it's possible that using a smaller or larger buffer might provide better performance
@@ -116,6 +114,7 @@ pub fn exec(mut bytes: Vec<u8>) -> io::Result<()> {
116114
pub fn exec(mut bytes: Vec<u8>) -> io::Result<()> {
117115
use uucore::pipes::{pipe, splice, tee};
118116

117+
const PAGE_SIZE: usize = 4096;
119118
let aligned = PAGE_SIZE.is_multiple_of(bytes.len());
120119
repeat_content_to_capacity(&mut bytes);
121120
let bytes = bytes.as_slice();

0 commit comments

Comments
 (0)