*: 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

@ -118,12 +118,8 @@ impl PendingConnect {
#[derive(Debug, Error)]
pub enum UpgradeError {
#[error("Failed to encode or decode")]
Codec(
#[from]
#[source]
prost_codec::Error,
),
#[error(transparent)]
Codec(#[from] prost_codec::Error),
#[error("Stream closed")]
StreamClosed,
#[error("Expected at least one address in reservation.")]

View File

@ -116,12 +116,8 @@ pub struct Connect {
#[derive(Debug, Error)]
pub enum UpgradeError {
#[error("Failed to encode or decode: {0}")]
Codec(
#[from]
#[source]
prost_codec::Error,
),
#[error(transparent)]
Codec(#[from] prost_codec::Error),
#[error("Stream closed")]
StreamClosed,
#[error("Expected 'status' field to be set.")]