Skip to content

Commit 9ba1d37

Browse files
committed
Impl From not Into
1 parent 4374fd7 commit 9ba1d37

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/error.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ impl From<io::Error> for Error {
5151
}
5252

5353
#[cfg(not(target_env = "sgx"))]
54-
impl Into<io::Error> for Error {
55-
fn into(self) -> io::Error {
56-
match self {
54+
impl From<Error> for io::Error {
55+
fn from(err: Error) -> Self {
56+
match err {
5757
UNKNOWN_ERROR => io::Error::new(io::ErrorKind::Other,
5858
"getrandom error: unknown"),
5959
UNAVAILABLE_ERROR => io::Error::new(io::ErrorKind::Other,

0 commit comments

Comments
 (0)