Skip to content

Commit e303503

Browse files
committed
fix clippy warnings
1 parent 5a9b649 commit e303503

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

adview-manager/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ pub fn apply_selection(campaigns: &[MarketChannel], options: &AdViewManagerOptio
154154
}
155155

156156
fn is_video(ad_unit: &AdUnit) -> bool {
157-
ad_unit.media_mime.split('/').nth(0) == Some("video")
157+
ad_unit.media_mime.split('/').next() == Some("video")
158158
}
159159

160160
fn calculate_target_score(a: &[TargetingTag], b: &[TargetingTag]) -> TargetingScore {

sentry/src/middleware/auth.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn get_request_ip(req: &Request<Body>) -> Option<String> {
8383
.get("true-client-ip")
8484
.or_else(|| req.headers().get("x-forwarded-for"))
8585
.and_then(|hv| hv.to_str().map(ToString::to_string).ok())
86-
.map(|token| token.split(',').nth(0).map(ToString::to_string))
86+
.map(|token| token.split(',').next().map(ToString::to_string))
8787
.flatten()
8888
}
8989

0 commit comments

Comments
 (0)