removed mentions of fail, updated alloc

This commit is contained in:
mwojcik 2021-07-27 10:27:43 +02:00
parent 0d7d403edc
commit 630a934df0
2 changed files with 8 additions and 10 deletions

View File

@ -8,9 +8,10 @@ name = "io"
path = "lib.rs"
[dependencies]
failure = { version = "0.1", default-features = false }
failure_derive = { version = "0.1", default-features = false }
core_io = { version = "0.1", features = ["collections"] }
byteorder = { version = "1.0", default-features = false, optional = true }
libsupport_zynq = { default-features = false, features = ["alloc_core"], git = "https://git.m-labs.hk/M-Labs/zynq-rs.git" }
[features]
alloc = []

View File

@ -2,12 +2,12 @@
#![feature(never_type)]
#![cfg_attr(feature = "alloc", feature(alloc))]
extern crate failure;
#[macro_use]
extern crate failure_derive;
extern crate alloc;
extern crate core_io;
#[cfg(feature = "alloc")]
#[macro_use]
extern crate alloc;
use alloc;
#[cfg(feature = "byteorder")]
extern crate byteorder;
@ -21,12 +21,9 @@ pub use proto::{ProtoRead, ProtoWrite};
#[cfg(all(feature = "byteorder", feature = "alloc"))]
pub use proto::ReadStringError;
#[derive(Fail, Debug, Clone, PartialEq)]
pub enum Error<T> {
#[fail(display = "unexpected end of stream")]
UnexpectedEnd,
#[fail(display = "{}", _0)]
Other(#[cause] T)
Other(T)
}
impl<T> From<T> for Error<T> {