File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ fn intercept(req: Request<()>) -> Result<Request<()>, Status> {
43
43
struct MyInterceptor ;
44
44
45
45
impl Interceptor for MyInterceptor {
46
- fn call ( & mut self , request : tonic:: Request < ( ) > ) -> Result < tonic:: Request < ( ) > , Status > {
46
+ fn intercept ( & mut self , request : tonic:: Request < ( ) > ) -> Result < tonic:: Request < ( ) > , Status > {
47
47
Ok ( request)
48
48
}
49
49
}
Original file line number Diff line number Diff line change @@ -40,14 +40,14 @@ use tower_service::Service;
40
40
/// [tower-example]: https://github.com/hyperium/tonic/tree/master/examples/src/tower
41
41
pub trait Interceptor {
42
42
/// Intercept a request before it is sent, optionally cancelling it.
43
- fn call ( & mut self , request : crate :: Request < ( ) > ) -> Result < crate :: Request < ( ) > , Status > ;
43
+ fn intercept ( & mut self , request : crate :: Request < ( ) > ) -> Result < crate :: Request < ( ) > , Status > ;
44
44
}
45
45
46
46
impl < F > Interceptor for F
47
47
where
48
48
F : FnMut ( crate :: Request < ( ) > ) -> Result < crate :: Request < ( ) > , Status > ,
49
49
{
50
- fn call ( & mut self , request : crate :: Request < ( ) > ) -> Result < crate :: Request < ( ) > , Status > {
50
+ fn intercept ( & mut self , request : crate :: Request < ( ) > ) -> Result < crate :: Request < ( ) > , Status > {
51
51
self ( request)
52
52
}
53
53
}
@@ -140,7 +140,7 @@ where
140
140
141
141
match self
142
142
. interceptor
143
- . call ( crate :: Request :: from_parts ( metadata, extensions, ( ) ) )
143
+ . intercept ( crate :: Request :: from_parts ( metadata, extensions, ( ) ) )
144
144
{
145
145
Ok ( req) => {
146
146
let ( metadata, extensions, _) = req. into_parts ( ) ;
You can’t perform that action at this time.
0 commit comments