1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

maint: format recent changes

This commit is contained in:
Michael Debertol 2021-05-28 17:49:11 +02:00
parent 263b122540
commit 59a42f1254
3 changed files with 11 additions and 14 deletions

View file

@ -210,14 +210,7 @@ pub fn dry_exec(mut tmpdir: PathBuf, prefix: &str, rand: usize, suffix: &str) ->
0 0
} }
fn exec( fn exec(dir: PathBuf, prefix: &str, rand: usize, suffix: &str, make_dir: bool, quiet: bool) -> i32 {
dir: PathBuf,
prefix: &str,
rand: usize,
suffix: &str,
make_dir: bool,
quiet: bool,
) -> i32 {
let res = if make_dir { let res = if make_dir {
let tmpdir = Builder::new() let tmpdir = Builder::new()
.prefix(prefix) .prefix(prefix)
@ -245,7 +238,7 @@ fn exec(
} }
} }
} }
Err(x) => Err(x) Err(x) => Err(x),
} }
}; };

View file

@ -34,7 +34,12 @@ const MIN_BUFFER_SIZE: usize = 8_000;
/// Sort files by using auxiliary files for storing intermediate chunks (if needed), and output the result. /// Sort files by using auxiliary files for storing intermediate chunks (if needed), and output the result.
pub fn ext_sort(files: &mut impl Iterator<Item = Box<dyn Read + Send>>, settings: &GlobalSettings) { pub fn ext_sort(files: &mut impl Iterator<Item = Box<dyn Read + Send>>, settings: &GlobalSettings) {
let tmp_dir = crash_if_err!(1, tempfile::Builder::new().prefix("uutils_sort").tempdir_in(&settings.tmp_dir)); let tmp_dir = crash_if_err!(
1,
tempfile::Builder::new()
.prefix("uutils_sort")
.tempdir_in(&settings.tmp_dir)
);
let (sorted_sender, sorted_receiver) = std::sync::mpsc::sync_channel(1); let (sorted_sender, sorted_receiver) = std::sync::mpsc::sync_channel(1);
let (recycled_sender, recycled_receiver) = std::sync::mpsc::sync_channel(1); let (recycled_sender, recycled_receiver) = std::sync::mpsc::sync_channel(1);
thread::spawn({ thread::spawn({

View file

@ -25,8 +25,7 @@ static VERSION: &str = env!("CARGO_PKG_VERSION");
static ABOUT: &str = static ABOUT: &str =
"Run COMMAND, with modified buffering operations for its standard streams.\n\n\ "Run COMMAND, with modified buffering operations for its standard streams.\n\n\
Mandatory arguments to long options are mandatory for short options too."; Mandatory arguments to long options are mandatory for short options too.";
static LONG_HELP: &str = static LONG_HELP: &str = "If MODE is 'L' the corresponding stream will be line buffered.\n\
"If MODE is 'L' the corresponding stream will be line buffered.\n\
This option is invalid with standard input.\n\n\ This option is invalid with standard input.\n\n\
If MODE is '0' the corresponding stream will be unbuffered.\n\n\ If MODE is '0' the corresponding stream will be unbuffered.\n\n\
Otherwise MODE is a number which may be followed by one of the following:\n\n\ Otherwise MODE is a number which may be followed by one of the following:\n\n\