*: Don't leak prost dependency in error types (#3058)

With the current design, a major version bump of `prost` leaks into
all consumers of `prost-codec`.
This commit is contained in:
Thomas Eizinger
2022-11-02 23:02:21 +11:00
committed by GitHub
parent b42f28630e
commit 71131e0622
70 changed files with 428 additions and 400 deletions

View File

@ -79,6 +79,10 @@ pub use translation::address_translation;
pub use transport::Transport;
pub use upgrade::{InboundUpgrade, OutboundUpgrade, ProtocolName, UpgradeError, UpgradeInfo};
#[derive(thiserror::Error, Debug)]
#[error(transparent)]
pub struct DecodeError(prost::DecodeError);
use std::{future::Future, pin::Pin};
/// Implemented on objects that can run a `Future` in the background.