Remove encode::Error::ByteOrder

Functions from the byteorder crate only return downstream io errors on
io calls.
This commit is contained in:
Steven Roose 2019-09-09 14:05:54 +01:00
parent 5f4555bfac
commit 617c07d796
No known key found for this signature in database
GPG Key ID: 2F2A88D7F8D68E87
1 changed files with 0 additions and 4 deletions

View File

@ -51,8 +51,6 @@ use network::address::Address;
pub enum Error { pub enum Error {
/// And I/O error /// And I/O error
Io(io::Error), Io(io::Error),
/// Error from the `byteorder` crate
ByteOrder(io::Error),
/// PSBT-related error /// PSBT-related error
Psbt(psbt::Error), Psbt(psbt::Error),
/// Network magic was not expected /// Network magic was not expected
@ -92,7 +90,6 @@ impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self { match *self {
Error::Io(ref e) => write!(f, "I/O error: {}", e), Error::Io(ref e) => write!(f, "I/O error: {}", e),
Error::ByteOrder(ref e) => write!(f, "byteorder error: {}", e),
Error::Psbt(ref e) => write!(f, "PSBT error: {}", e), Error::Psbt(ref e) => write!(f, "PSBT error: {}", e),
Error::UnexpectedNetworkMagic { expected: ref e, actual: ref a } => write!(f, Error::UnexpectedNetworkMagic { expected: ref e, actual: ref a } => write!(f,
"unexpected network magic: expected {}, actual {}", e, a), "unexpected network magic: expected {}, actual {}", e, a),
@ -115,7 +112,6 @@ impl error::Error for Error {
fn cause(&self) -> Option<&error::Error> { fn cause(&self) -> Option<&error::Error> {
match *self { match *self {
Error::Io(ref e) => Some(e), Error::Io(ref e) => Some(e),
Error::ByteOrder(ref e) => Some(e),
Error::Psbt(ref e) => Some(e), Error::Psbt(ref e) => Some(e),
Error::UnexpectedNetworkMagic { .. } Error::UnexpectedNetworkMagic { .. }
| Error::OversizedVectorAllocation { .. } | Error::OversizedVectorAllocation { .. }