Skip to content

Commit

Permalink
Rollup merge of rust-lang#33898 - srinivasreddy:rustfmt_liblog, r=Man…
Browse files Browse the repository at this point in the history
…ishearth

rustfmt on liblog
  • Loading branch information
GuillaumeGomez committed May 27, 2016
2 parents ee0821a + 38bbb60 commit 2c4fd94
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/liblog/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ use std::io::prelude::*;
use std::mem;
use std::env;
use std::slice;
use std::sync::{Once, Mutex, ONCE_INIT};
use std::sync::{Mutex, ONCE_INIT, Once};

use directive::LOG_LEVEL_NAMES;

Expand Down Expand Up @@ -290,9 +290,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: fmt::Arguments) {
// frob the slot while we're doing the logging. This will destroy any logger
// set during logging.
let logger = LOCAL_LOGGER.with(|s| s.borrow_mut().take());
let mut logger = logger.unwrap_or_else(|| {
Box::new(DefaultLogger { handle: io::stderr() })
});
let mut logger = logger.unwrap_or_else(|| Box::new(DefaultLogger { handle: io::stderr() }));
logger.log(&LogRecord {
level: LogLevel(level),
args: args,
Expand Down

0 comments on commit 2c4fd94

Please sign in to comment.