diff --git a/src/bin/mdbook.rs b/src/bin/mdbook.rs index a7424fe6..16f2c796 100644 --- a/src/bin/mdbook.rs +++ b/src/bin/mdbook.rs @@ -1,6 +1,6 @@ +extern crate chrono; #[macro_use] extern crate clap; -extern crate chrono; extern crate env_logger; extern crate error_chain; #[macro_use] @@ -38,7 +38,7 @@ fn main() { .author("Mathieu David ") // Get the version from our Cargo.toml using clap's crate_version!() macro .version(concat!("v",crate_version!())) - .setting(AppSettings::SubcommandRequired) + .setting(AppSettings::ArgRequiredElseHelp) .after_help("For more information about a specific command, \ try `mdbook --help`\n\ Source code for mdbook available \ @@ -77,11 +77,14 @@ fn init_logger() { let mut builder = Builder::new(); builder.format(|formatter, record| { - writeln!(formatter, "{} [{}] ({}): {}", - Local::now().format("%Y-%m-%d %H:%M:%S"), - record.level(), - record.target(), - record.args()) + writeln!( + formatter, + "{} [{}] ({}): {}", + Local::now().format("%Y-%m-%d %H:%M:%S"), + record.level(), + record.target(), + record.args() + ) }); if let Ok(var) = env::var("RUST_LOG") {