11use  std:: { collections:: HashSet ,  convert:: TryInto ,  error:: Error  as  StdError ,  rc:: Rc } ; 
22
3+ use  actix_utils:: future:: { ok,  Either ,  Ready } ; 
34use  actix_web:: { 
45    body:: { AnyBody ,  MessageBody } , 
56    dev:: { Service ,  ServiceRequest ,  ServiceResponse } , 
@@ -10,7 +11,7 @@ use actix_web::{
1011    } , 
1112    HttpResponse , 
1213} ; 
13- use  futures_util:: future:: { ok ,   Either ,   FutureExt  as  _,  LocalBoxFuture ,   Ready ,  TryFutureExt  as  _} ; 
14+ use  futures_util:: future:: { FutureExt  as  _,  LocalBoxFuture ,  TryFutureExt  as  _} ; 
1415use  log:: debug; 
1516
1617use  crate :: { builder:: intersperse_header_values,  AllOrSome ,  Inner } ; 
@@ -155,15 +156,15 @@ where
155156        if  self . inner . preflight  && req. method ( )  == Method :: OPTIONS  { 
156157            let  inner = Rc :: clone ( & self . inner ) ; 
157158            let  res = Self :: handle_preflight ( & inner,  req) ; 
158-             Either :: Left ( ok ( res) ) 
159+             Either :: left ( ok ( res) ) 
159160        }  else  { 
160161            let  origin = req. headers ( ) . get ( header:: ORIGIN ) . cloned ( ) ; 
161162
162163            if  origin. is_some ( )  { 
163164                // Only check requests with a origin header. 
164165                if  let  Err ( err)  = self . inner . validate_origin ( req. head ( ) )  { 
165166                    debug ! ( "origin validation failed; inner service is not called" ) ; 
166-                     return  Either :: Left ( ok ( req. error_response ( err) ) ) ; 
167+                     return  Either :: left ( ok ( req. error_response ( err) ) ) ; 
167168                } 
168169            } 
169170
@@ -183,7 +184,7 @@ where
183184            . map_ok ( |res| res. map_body ( |_,  body| AnyBody :: new_boxed ( body) ) ) 
184185            . boxed_local ( ) ; 
185186
186-             Either :: Right ( res) 
187+             Either :: right ( res) 
187188        } 
188189    } 
189190} 
0 commit comments