Skip to content

Commit 6551df0

Browse files
committed
Fix some clippy warnings rust-ndarray#642
1 parent 71c0980 commit 6551df0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/array_serde.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<S, Di> ArrayVisitor<S, Di> {
139139
}
140140
}
141141

142-
static ARRAY_FIELDS: &'static [&'static str] = &["v", "dim", "data"];
142+
static ARRAY_FIELDS: &[&str] = &["v", "dim", "data"];
143143

144144
/// **Requires crate feature `"serde-1"`**
145145
impl<'de, A, Di, S> Deserialize<'de> for ArrayBase<S, Di>

src/arrayformat.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ enum PrintableCell {
5252
fn to_be_printed(length: usize, limit: usize) -> Vec<PrintableCell> {
5353
if length <= 2 * limit {
5454
(0..length)
55-
.map(|x| PrintableCell::ElementIndex(x))
55+
.map(PrintableCell::ElementIndex)
5656
.collect()
5757
} else {
5858
let mut v: Vec<PrintableCell> =
59-
(0..limit).map(|x| PrintableCell::ElementIndex(x)).collect();
59+
(0..limit).map(PrintableCell::ElementIndex).collect();
6060
v.push(PrintableCell::Ellipses);
61-
v.extend((length - limit..length).map(|x| PrintableCell::ElementIndex(x)));
61+
v.extend((length - limit..length).map(PrintableCell::ElementIndex));
6262
v
6363
}
6464
}

0 commit comments

Comments
 (0)