Skip to content

Commit 6b3cd7f

Browse files
committed
Fix clippy lints
1 parent 7a0add3 commit 6b3cd7f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

examples/github.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ fn main() {
131131
let scopes = if let Some(scopes_vec) = token.scopes() {
132132
scopes_vec
133133
.iter()
134-
.map(|comma_separated| comma_separated.split(","))
135-
.flat_map(|inner_scopes| inner_scopes)
134+
.map(|comma_separated| comma_separated.split(','))
135+
.flatten()
136136
.collect::<Vec<_>>()
137137
} else {
138138
Vec::new()

src/helpers.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ where
6868
/// # struct GroceryBasket {
6969
/// # items: Vec<String>,
7070
/// # }
71-
/// # fn main() {
7271
/// GroceryBasket {
7372
/// items: vec!["foo".to_string(), "bar".to_string(), "baz".to_string()]
7473
/// };
75-
/// # }
7674
/// ```
7775
///
7876
/// Note: this example does not compile automatically due to

src/tests.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,9 +1077,9 @@ mod colorful_extension {
10771077
impl ColorfulErrorResponseType {
10781078
fn to_str(&self) -> &str {
10791079
match self {
1080-
&ColorfulErrorResponseType::TooDark => "too_dark",
1081-
&ColorfulErrorResponseType::TooLight => "too_light",
1082-
&ColorfulErrorResponseType::WrongColorSpace => "wrong_color_space",
1080+
ColorfulErrorResponseType::TooDark => "too_dark",
1081+
ColorfulErrorResponseType::TooLight => "too_light",
1082+
ColorfulErrorResponseType::WrongColorSpace => "wrong_color_space",
10831083
}
10841084
}
10851085
}

0 commit comments

Comments
 (0)