forked from M-Labs/artiq-zynq
removed mentions of fail, updated alloc
This commit is contained in:
parent
0d7d403edc
commit
630a934df0
@ -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 = []
|
||||
|
@ -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> {
|
||||
|
Loading…
Reference in New Issue
Block a user