Skip to content

Commit efdd8fd

Browse files
committed
Remove unnecessary return statements
1 parent a99b957 commit efdd8fd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/models/token/scopes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

src/real_ip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)