Skip to content

Commit 3542956

Browse files
committed
Add Clone to Extensions::insert<T>
`http::Extensions::insert` requires `T: Clone` so we add it.
1 parent 998f4f2 commit 3542956

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tonic/src/extensions.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ impl Extensions {
2424
/// If a extension of this type already existed, it will
2525
/// be returned.
2626
#[inline]
27-
pub fn insert<T: Send + Sync + 'static>(&mut self, val: T) -> Option<T> {
27+
pub fn insert<T: Send + Sync + Clone + 'static>(&mut self, val: T) -> Option<T> {
2828
self.inner.insert(val)
2929
}
3030

@@ -95,3 +95,4 @@ impl GrpcMethod {
9595
self.method
9696
}
9797
}
98+

0 commit comments

Comments
 (0)