Skip to content

Commit fb185be

Browse files
committed
fix clippy
1 parent 08eee0f commit fb185be

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

adview-manager/src/lib.rs

+1-1
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 {

primitives/src/big_num.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use std::convert::TryFrom;
2-
use std::error::Error;
32
use std::iter::Sum;
43
use std::ops::{Add, AddAssign, Div, Mul, Sub};
54
use std::str::FromStr;
@@ -195,7 +194,7 @@ impl TryFrom<&str> for BigNum {
195194

196195
fn try_from(num: &str) -> Result<Self, Self::Error> {
197196
let big_uint = BigUint::from_str(&num)
198-
.map_err(|err| super::DomainError::InvalidArgument(err.description().to_string()))?;
197+
.map_err(|err| super::DomainError::InvalidArgument(err.to_string()))?;
199198

200199
Ok(Self(big_uint))
201200
}

primitives/src/config.rs

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ use lazy_static::lazy_static;
44
use serde::{Deserialize, Serialize};
55
use serde_hex::{SerHex, StrictPfx};
66
use std::fs;
7-
use toml;
87

98
lazy_static! {
109
static ref DEVELOPMENT_CONFIG: Config =

0 commit comments

Comments
 (0)