diff --git a/src/uu/yes/src/yes.rs b/src/uu/yes/src/yes.rs index 46f6b2ddb3d..825197f942a 100644 --- a/src/uu/yes/src/yes.rs +++ b/src/uu/yes/src/yes.rs @@ -13,8 +13,6 @@ use uucore::error::{UResult, USimpleError, strip_errno}; use uucore::pipes::MAX_ROOTLESS_PIPE_SIZE; use uucore::{format_usage, translate}; -#[cfg(any(target_os = "linux", target_os = "android"))] -const PAGE_SIZE: usize = 4096; #[cfg(any(target_os = "linux", target_os = "android"))] const BUF_SIZE: usize = MAX_ROOTLESS_PIPE_SIZE; // it's possible that using a smaller or larger buffer might provide better performance @@ -116,6 +114,7 @@ pub fn exec(mut bytes: Vec) -> io::Result<()> { pub fn exec(mut bytes: Vec) -> io::Result<()> { use uucore::pipes::{pipe, splice, tee}; + const PAGE_SIZE: usize = 4096; let aligned = PAGE_SIZE.is_multiple_of(bytes.len()); repeat_content_to_capacity(&mut bytes); let bytes = bytes.as_slice();