1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

mktemp: fix whitespace

This commit is contained in:
Joseph Crail 2016-05-22 16:08:22 -04:00
parent b132f65126
commit af6c88f676

View file

@ -31,7 +31,6 @@ static VERSION: &'static str = env!("CARGO_PKG_VERSION");
static DEFAULT_TEMPLATE: &'static str = "tmp.XXXXXXXXXX"; static DEFAULT_TEMPLATE: &'static str = "tmp.XXXXXXXXXX";
pub fn uumain(args: Vec<String>) -> i32 { pub fn uumain(args: Vec<String>) -> i32 {
let mut opts = getopts::Options::new(); let mut opts = getopts::Options::new();
opts.optflag("d", "directory", "Make a directory instead of a file"); opts.optflag("d", "directory", "Make a directory instead of a file");
@ -171,16 +170,12 @@ pub fn dry_exec(mut tmpdir: PathBuf, prefix: &str, rand: usize, suffix: &str) ->
0 0
} }
fn exec(tmpdir: PathBuf, prefix: &str, rand: usize, suffix: &str, make_dir: bool) -> i32 { fn exec(tmpdir: PathBuf, prefix: &str, rand: usize, suffix: &str, make_dir: bool) -> i32 {
// TODO: respect make_dir option // TODO: respect make_dir option
if make_dir { if make_dir {
crash!(1, "Directory option is not supported yet. Sorry."); crash!(1, "Directory option is not supported yet. Sorry.");
} }
let tmpfile = NamedTempFileOptions::new() let tmpfile = NamedTempFileOptions::new()
.prefix(prefix) .prefix(prefix)
.rand_bytes(rand) .rand_bytes(rand)