File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -428,9 +428,7 @@ impl Dispatcher {
428
428
}
429
429
430
430
fn on_grpc_receive_initial_metadata ( & self , token_id : u32 , headers : u32 ) {
431
- let grpc_streams_ref = self . grpc_streams . borrow_mut ( ) ;
432
- let context_id_hash_slot = grpc_streams_ref. get ( & token_id) ;
433
- let context_id = match context_id_hash_slot {
431
+ let context_id = match self . grpc_streams . borrow_mut ( ) . get ( & token_id) {
434
432
Some ( id) => * id,
435
433
None => {
436
434
// TODO: change back to a panic once underlying issue is fixed.
@@ -490,9 +488,7 @@ impl Dispatcher {
490
488
}
491
489
492
490
fn on_grpc_receive_trailing_metadata ( & self , token_id : u32 , trailers : u32 ) {
493
- let grpc_streams_ref = self . grpc_streams . borrow_mut ( ) ;
494
- let context_id_hash_slot = grpc_streams_ref. get ( & token_id) ;
495
- let context_id = match context_id_hash_slot {
491
+ let context_id = match self . grpc_streams . borrow_mut ( ) . get ( & token_id) {
496
492
Some ( id) => * id,
497
493
None => {
498
494
// TODO: change back to a panic once underlying issue is fixed.
You can’t perform that action at this time.
0 commit comments