File tree Expand file tree Collapse file tree 5 files changed +13
-31
lines changed 
listener/src/proxy_protocol Expand file tree Collapse file tree 5 files changed +13
-31
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,8 @@ jobs:
195195
196196      - name : Install toolchain 
197197        run : | 
198-           rustup toolchain install 1.81 .0 
199-           rustup default 1.81 .0 
198+           rustup toolchain install 1.82 .0 
199+           rustup default 1.82 .0 
200200          rustup component add clippy 
201201
202202       - name : Setup OPA 
Original file line number Diff line number Diff line change 88#  The Debian version and version name must be in sync
99ARG  DEBIAN_VERSION=12
1010ARG  DEBIAN_VERSION_NAME=bookworm
11- ARG  RUSTC_VERSION=1.81 .0
11+ ARG  RUSTC_VERSION=1.82 .0
1212ARG  NODEJS_VERSION=20.15.0
1313ARG  OPA_VERSION=0.64.1
1414ARG  CARGO_AUDITABLE_VERSION=0.6.4
Original file line number Diff line number Diff line change @@ -123,17 +123,8 @@ where
123123        parts :  & mut  axum:: http:: request:: Parts , 
124124        state :  & S , 
125125    )  -> Result < Self ,  Self :: Rejection >  { 
126-         let  activity_tracker = BoundActivityTracker :: from_request_parts ( parts,  state) . await ; 
127-         let  activity_tracker = match  activity_tracker { 
128-             Ok ( t)  => t, 
129-             Err ( e)  => match  e { } , 
130-         } ; 
131- 
132-         let  clock = BoxClock :: from_request_parts ( parts,  state) . await ; 
133-         let  clock = match  clock { 
134-             Ok ( c)  => c, 
135-             Err ( e)  => match  e { } , 
136-         } ; 
126+         let  Ok ( activity_tracker)  = BoundActivityTracker :: from_request_parts ( parts,  state) . await ; 
127+         let  Ok ( clock)  = BoxClock :: from_request_parts ( parts,  state) . await ; 
137128
138129        // Load the database repository 
139130        let  mut  repo = BoxRepository :: from_request_parts ( parts,  state) 
Original file line number Diff line number Diff line change @@ -264,14 +264,8 @@ impl TestState {
264264            . with_state ( self . clone ( ) ) 
265265            . into_service ( ) ; 
266266
267-         // Both unwrap are on Infallible, so this is safe 
268-         let  response = app
269-             . ready_oneshot ( ) 
270-             . await 
271-             . unwrap ( ) 
272-             . call ( request) 
273-             . await 
274-             . unwrap ( ) ; 
267+         let  Ok ( mut  service)  = app. ready_oneshot ( ) . await ; 
268+         let  Ok ( response)  = service. call ( request) . await ; 
275269
276270        let  ( parts,  body)  = response. into_parts ( ) ; 
277271
Original file line number Diff line number Diff line change @@ -55,15 +55,12 @@ impl MaybeProxyAcceptor {
5555    where 
5656        T :  AsyncRead  + Unpin , 
5757    { 
58-         match  & self . acceptor  { 
59-             Some ( acceptor)  => { 
60-                 let  ( info,  stream)  = acceptor. accept ( stream) . await ?; 
61-                 Ok ( ( Some ( info) ,  stream) ) 
62-             } 
63-             None  => { 
64-                 let  stream = Rewind :: new ( stream) ; 
65-                 Ok ( ( None ,  stream) ) 
66-             } 
58+         if  let  Some ( acceptor)  = self . acceptor  { 
59+             let  ( info,  stream)  = acceptor. accept ( stream) . await ?; 
60+             Ok ( ( Some ( info) ,  stream) ) 
61+         }  else  { 
62+             let  stream = Rewind :: new ( stream) ; 
63+             Ok ( ( None ,  stream) ) 
6764        } 
6865    } 
6966} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments