We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a00200e commit 6f7e35cCopy full SHA for 6f7e35c
tonic/src/service/interceptor.rs
@@ -73,7 +73,7 @@ pub struct InterceptorLayer<I> {
73
74
impl<S, I> Layer<S> for InterceptorLayer<I>
75
where
76
- I: Interceptor + Clone,
+ I: Clone,
77
{
78
type Service = InterceptedService<S, I>;
79
@@ -94,10 +94,7 @@ pub struct InterceptedService<S, I> {
94
impl<S, I> InterceptedService<S, I> {
95
/// Create a new `InterceptedService` that wraps `S` and intercepts each request with the
96
/// function `F`.
97
- pub fn new(service: S, interceptor: I) -> Self
98
- where
99
- I: Interceptor,
100
- {
+ pub fn new(service: S, interceptor: I) -> Self {
101
Self {
102
inner: service,
103
interceptor,
0 commit comments