Skip to content

Commit d9aa346

Browse files
Reduce number of cfgs
1 parent f3a4c8b commit d9aa346

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/error.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ use core2::{error::Error as StdError, io::Error as IoError};
44
use std::{error::Error as StdError, io::Error as IoError};
55

66
use unsigned_varint::decode::Error as DecodeError;
7-
#[cfg(feature = "std")]
8-
use unsigned_varint::io::ReadError;
97

108
/// Multihash error.
119
#[derive(Debug)]
@@ -40,11 +38,11 @@ impl From<IoError> for Error {
4038
}
4139

4240
#[cfg(feature = "std")]
43-
impl From<ReadError> for Error {
44-
fn from(err: ReadError) -> Self {
41+
impl From<unsigned_varint::io::ReadError> for Error {
42+
fn from(err: unsigned_varint::io::ReadError) -> Self {
4543
match err {
46-
ReadError::Io(err) => Self::Io(err),
47-
ReadError::Decode(err) => Self::Varint(err),
44+
unsigned_varint::io::ReadError::Io(err) => Self::Io(err),
45+
unsigned_varint::io::ReadError::Decode(err) => Self::Varint(err),
4846
_ => unreachable!(),
4947
}
5048
}

0 commit comments

Comments
 (0)