mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-02-13 21:18:18 +01:00
Track latest changes to tokio-proto.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// Licensed under the MIT License, <LICENSE or http://opensource.org/licenses/MIT>.
|
||||
// This file may not be copied, modified, or distributed except according to those terms.
|
||||
|
||||
use {bincode, tokio_proto as proto};
|
||||
use bincode;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{fmt, io};
|
||||
use std::error::Error as StdError;
|
||||
@@ -75,15 +75,6 @@ impl<E: SerializableError> StdError for Error<E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> From<proto::Error<Error<E>>> for Error<E> {
|
||||
fn from(err: proto::Error<Error<E>>) -> Self {
|
||||
match err {
|
||||
proto::Error::Transport(e) => e,
|
||||
proto::Error::Io(e) => e.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> From<io::Error> for Error<E> {
|
||||
fn from(err: io::Error) -> Self {
|
||||
Error::Io(err)
|
||||
|
||||
Reference in New Issue
Block a user