diff options
author | Doug Goldstein <cardoe@cardoe.com> | 2017-04-16 15:53:08 -0500 |
---|---|---|
committer | Doug Goldstein <cardoe@cardoe.com> | 2017-04-16 16:11:12 -0500 |
commit | d999d22d07d35c964bcdd9d70f42b80e5e6452fc (patch) | |
tree | 28c8327990c486b5e2e09ff41c664fac7fd85a06 /src | |
parent | set the new minimum supported version to Rust 1.13.0 (diff) | |
download | cargo-ebuild-d999d22d07d35c964bcdd9d70f42b80e5e6452fc.tar.gz cargo-ebuild-d999d22d07d35c964bcdd9d70f42b80e5e6452fc.tar.bz2 cargo-ebuild-d999d22d07d35c964bcdd9d70f42b80e5e6452fc.zip |
cargo fmt with rustfmt 0.8.0
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/main.rs b/src/main.rs index 1c55831..2cda495 100644 --- a/src/main.rs +++ b/src/main.rs @@ -68,9 +68,9 @@ fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> { .as_ref() .cloned() .unwrap_or(metadata.repository - .as_ref() - .cloned() - .unwrap_or_else(|| String::from(""))); + .as_ref() + .cloned() + .unwrap_or_else(|| String::from(""))); let license = metadata.license .as_ref() @@ -82,14 +82,15 @@ fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> { // Open the file where we'll write the ebuild let mut file = try!(OpenOptions::new() - .write(true) - .create(true) - .truncate(true) - .open(&ebuild_path) - .map_err(|err| { - CliError::new(&format!("failed to create ebuild: {}", err.description()), - 1) - })); + .write(true) + .create(true) + .truncate(true) + .open(&ebuild_path) + .map_err(|err| { + CliError::new(&format!("failed to create ebuild: {}", + err.description()), + 1) + })); // write the contents out try!(write!(file, @@ -101,10 +102,11 @@ fn real_main(options: Options, config: &Config) -> CliResult<Option<()>> { cargo_ebuild_ver = env!("CARGO_PKG_VERSION"), this_year = 1900 + time::now().tm_year, ) - .map_err(|err| { - CliError::new(&format!("unable to write ebuild to disk: {}", err.description()), - 1) - })); + .map_err(|err| { + CliError::new(&format!("unable to write ebuild to disk: {}", + err.description()), + 1) + })); println!("Wrote: {}", ebuild_path.display()); |