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 @@ -116,10 +116,10 @@ impl CrateScope {
116116 return true ;
117117 }
118118
119- return match self . pattern . strip_suffix ( '*' ) {
119+ match self . pattern . strip_suffix ( '*' ) {
120120 Some ( prefix) => crate_name. starts_with ( prefix) ,
121121 None => crate_name == self . pattern ,
122- } ;
122+ }
123123 }
124124}
125125
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ pub fn process_xff_headers(headers: &HeaderMap) -> Option<IpAddr> {
4646 } ;
4747
4848 let has_more_headers = xff_iter. next ( ) . is_some ( ) ;
49- return if has_more_headers {
49+ if has_more_headers {
5050 // This only happens for requests going directly to crates-io.herokuapp.com,
5151 // since AWS CloudFront automatically merges these headers into one.
5252 //
@@ -81,7 +81,7 @@ pub fn process_xff_headers(headers: &HeaderMap) -> Option<IpAddr> {
8181 . filter_map ( |r| r. ok ( ) )
8282 . filter ( |ip| !is_cloud_front_ip ( ip) )
8383 . next_back ( )
84- } ;
84+ }
8585}
8686
8787/// Parses the content of an `X-Forwarded-For` header into a
You can’t perform that action at this time.
0 commit comments