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" path = "lib.rs"
[dependencies] [dependencies]
failure = { version = "0.1", default-features = false } core_io = { version = "0.1", features = ["collections"] }
failure_derive = { version = "0.1", default-features = false }
byteorder = { version = "1.0", default-features = false, optional = true } 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] [features]
alloc = [] alloc = []

View File

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