Use the log/env_logger crates from crates.io
This commit is contained in:
parent
7e76fad1f5
commit
cda463275e
3 changed files with 16 additions and 0 deletions
11
Cargo.lock
generated
11
Cargo.lock
generated
|
|
@ -3,6 +3,8 @@ name = "rustfmt"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"diff 0.1.7 (git+https://github.com/utkarshkukreti/diff.rs.git)",
|
||||
"env_logger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"strings 0.0.1 (git+https://github.com/nrc/strings.rs.git)",
|
||||
|
|
@ -24,6 +26,15 @@ name = "diff"
|
|||
version = "0.1.7"
|
||||
source = "git+https://github.com/utkarshkukreti/diff.rs.git#6edb9454bf4127087aced0fe07ab3ea6894083cb"
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"log 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"regex 0.1.41 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "kernel32-sys"
|
||||
version = "0.1.4"
|
||||
|
|
|
|||
|
|
@ -16,5 +16,7 @@ regex = "0.1.41"
|
|||
term = "0.2.11"
|
||||
strings = { version = "0.0.1", git = "https://github.com/nrc/strings.rs.git" }
|
||||
diff = { git = "https://github.com/utkarshkukreti/diff.rs.git" }
|
||||
log = "0.3.2"
|
||||
env_logger = "0.3.1"
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
extern crate log;
|
||||
extern crate rustfmt;
|
||||
extern crate toml;
|
||||
extern crate env_logger;
|
||||
|
||||
use rustfmt::{WriteMode, run};
|
||||
use rustfmt::config::Config;
|
||||
|
|
@ -71,6 +72,8 @@ fn execute() -> i32 {
|
|||
|
||||
fn main() {
|
||||
use std::io::Write;
|
||||
let _ = env_logger::init();
|
||||
|
||||
let exit_code = execute();
|
||||
// Make sure standard output is flushed before we exit
|
||||
std::io::stdout().flush().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue