From cdb777a2430fedba9a6cfb7d0de717db758589c9 Mon Sep 17 00:00:00 2001 From: Terts Diepraam Date: Wed, 16 Nov 2022 23:47:45 +0100 Subject: [PATCH] stat: remove pub after moving tests --- src/uu/stat/src/stat.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 5ac66ebe1..5b7692215 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -29,7 +29,7 @@ use std::{cmp, fs, iter}; const ABOUT: &str = "Display file or file system status."; const USAGE: &str = "{} [OPTION]... FILE..."; -pub mod options { +mod options { pub const DEREFERENCE: &str = "dereference"; pub const FILE_SYSTEM: &str = "file-system"; pub const FORMAT: &str = "format"; @@ -39,13 +39,13 @@ pub mod options { } #[derive(Default, Debug, PartialEq, Eq, Clone, Copy)] -pub struct Flags { - pub alter: bool, - pub zero: bool, - pub left: bool, - pub space: bool, - pub sign: bool, - pub group: bool, +struct Flags { + alter: bool, + zero: bool, + left: bool, + space: bool, + sign: bool, + group: bool, } /// checks if the string is within the specified bound, @@ -135,7 +135,7 @@ pub enum OutputType { } #[derive(Debug, PartialEq, Eq)] -pub enum Token { +enum Token { Char(char), Directive { flag: Flags, @@ -145,7 +145,7 @@ pub enum Token { }, } -pub trait ScanUtil { +trait ScanUtil { fn scan_num(&self) -> Option<(F, usize)> where F: std::str::FromStr; @@ -210,7 +210,7 @@ impl ScanUtil for str { } } -pub fn group_num(s: &str) -> Cow { +fn group_num(s: &str) -> Cow { let is_negative = s.starts_with('-'); assert!(is_negative || s.chars().take(1).all(|c| c.is_ascii_digit())); assert!(s.chars().skip(1).all(|c| c.is_ascii_digit())); @@ -234,7 +234,7 @@ pub fn group_num(s: &str) -> Cow { res.into() } -pub struct Stater { +struct Stater { follow: bool, show_fs: bool, from_user: bool, @@ -358,7 +358,7 @@ fn print_it(output: &OutputType, flags: Flags, width: usize, precision: i32) { } impl Stater { - pub fn generate_tokens(format_str: &str, use_printf: bool) -> UResult> { + fn generate_tokens(format_str: &str, use_printf: bool) -> UResult> { let mut tokens = Vec::new(); let bound = format_str.len(); let chars = format_str.chars().collect::>();