Skip to content

Commit

Permalink
Add workaround for bug occuring in latest compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
daboross committed Dec 22, 2014
1 parent 3329792 commit c092505
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ version = "0.1.1-dev"
authors = ["Dabo Ross <[email protected]>"]
description = "Fern is a simple runtime-configurable logging library"

documentation = "https://dabo.guru/rust/fern/"
repository = "https://github.com/daboross/fern-rs"
documentation = "https://dabo.guru/rust/fern_macros/"
repository = "https://github.com/daboross/fern-macros-rs"

readme = "README.md"
keywords = ["log", "logging", "logger", "fern"]
Expand Down
6 changes: 5 additions & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ impl OutputConfig {
pub fn into_logger(self) -> io::IoResult<Box<api::Logger + Sync + Send>> {
return Ok(match self {
OutputConfig::Parent(config) => try!(config.into_logger()),
OutputConfig::File(ref path) => box try!(loggers::WriterLogger::<io::File>::with_file(path)) as Box<api::Logger + Sync + Send>,
OutputConfig::File(ref path) => {
// workaround for error if this is all on one line
let log = box try!(loggers::WriterLogger::<io::File>::with_file(path));
log as Box<api::Logger + Sync + Send>
},
OutputConfig::Stdout => box loggers::WriterLogger::<stdio::StdWriter>::with_stdout() as Box<api::Logger + Sync + Send>,
OutputConfig::Stderr => box loggers::WriterLogger::<stdio::StdWriter>::with_stderr() as Box<api::Logger + Sync + Send>,
OutputConfig::Custom(log) => log,
Expand Down

0 comments on commit c092505

Please sign in to comment.