-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update for latest rustc, and start using a custom fern::Error enum fo…
…r error results, instead of just IoError. This releases 0.1.4.
- Loading branch information
Showing
6 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[package] | ||
|
||
name = "fern" | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
authors = ["Dabo Ross <[email protected]>"] | ||
description = "Fern is a simple runtime-configurable logging library" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use std::io; | ||
use std::sync; | ||
use std::error; | ||
|
||
#[deriving(Show)] | ||
pub enum Error { | ||
Io(io::IoError), | ||
Poison(String), | ||
} | ||
|
||
impl error::FromError<io::IoError> for Error { | ||
fn from_error(error: io::IoError) -> Error { | ||
Error::Io(error) | ||
} | ||
} | ||
|
||
impl <T> error::FromError<sync::PoisonError<T>> for Error { | ||
fn from_error(error: sync::PoisonError<T>) -> Error { | ||
Error::Poison(format!("{}", error)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters