Navigation Menu

Skip to content

Commit

Permalink
Implement From for io:Error
Browse files Browse the repository at this point in the history
  • Loading branch information
Licenser committed Mar 22, 2020
1 parent 2ed126f commit ae2b338
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "simd-json"
version = "0.3.1"
version = "0.3.2"
authors = ["Heinz N. Gies <heinz@licenser.net>", "Sunny Gleason"]
edition = "2018"
exclude = [ "data/*" ]
Expand Down
6 changes: 6 additions & 0 deletions src/error.rs
Expand Up @@ -170,6 +170,12 @@ impl fmt::Display for Error {
}
}

impl From<Error> for std::io::Error {
fn from(e: Error) -> Self {
std::io::Error::new(std::io::ErrorKind::Other, e)
}
}

#[cfg(test)]
mod test {
use super::*;
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Expand Up @@ -139,6 +139,9 @@ extern crate serde as serde_ext;
/// serde related helper functions
pub mod serde;

#[cfg(feature = "serde_impl")]
pub use crate::serde::{from_reader, from_slice, from_str};

/// Default trait imports;
pub mod prelude;

Expand Down

0 comments on commit ae2b338

Please sign in to comment.