mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-05 04:31:35 +00:00
Replace protobuf crate with prost! (#1390)
* Replace protobuf crate with prost! * Add copyright headers to build.rs files. * kad: Fix error when mapping connection types. Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com> * Fix more mapping mistakes. Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
committed by
Pierre Krieger
parent
9d2df148cd
commit
680c467f7e
@ -35,7 +35,7 @@ pub enum NoiseError {
|
||||
/// upgrade failed.
|
||||
AuthenticationFailed,
|
||||
/// A handshake payload is invalid.
|
||||
InvalidPayload(protobuf::ProtobufError),
|
||||
InvalidPayload(prost::DecodeError),
|
||||
/// A signature was required and could not be created.
|
||||
SigningError(identity::error::SigningError),
|
||||
#[doc(hidden)]
|
||||
@ -82,8 +82,8 @@ impl From<SnowError> for NoiseError {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<protobuf::ProtobufError> for NoiseError {
|
||||
fn from(e: protobuf::ProtobufError) -> Self {
|
||||
impl From<prost::DecodeError> for NoiseError {
|
||||
fn from(e: prost::DecodeError) -> Self {
|
||||
NoiseError::InvalidPayload(e)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user