Skip to content

Commit cdbf940

Browse files
committed
tonic: add From<BoxError> implementation for tonic::transport::Error
1 parent 688522a commit cdbf940

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tonic/src/transport/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,9 @@ impl StdError for Error {
9090
.map(|source| &**source as &(dyn StdError + 'static))
9191
}
9292
}
93+
94+
impl From<crate::BoxError> for Error {
95+
fn from(value: crate::BoxError) -> Self {
96+
Self::from_source(value)
97+
}
98+
}

0 commit comments

Comments
 (0)