Skip to content

Commit 6f7e35c

Browse files
authored
chore(interceptor): Remove unnecessary Interceptor trait bound (#2002)
1 parent a00200e commit 6f7e35c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tonic/src/service/interceptor.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct InterceptorLayer<I> {
7373

7474
impl<S, I> Layer<S> for InterceptorLayer<I>
7575
where
76-
I: Interceptor + Clone,
76+
I: Clone,
7777
{
7878
type Service = InterceptedService<S, I>;
7979

@@ -94,10 +94,7 @@ pub struct InterceptedService<S, I> {
9494
impl<S, I> InterceptedService<S, I> {
9595
/// Create a new `InterceptedService` that wraps `S` and intercepts each request with the
9696
/// function `F`.
97-
pub fn new(service: S, interceptor: I) -> Self
98-
where
99-
I: Interceptor,
100-
{
97+
pub fn new(service: S, interceptor: I) -> Self {
10198
Self {
10299
inner: service,
103100
interceptor,

0 commit comments

Comments
 (0)