Skip to content

Commit

Permalink
Fix some clippy warnings rust-ndarray#642
Browse files Browse the repository at this point in the history
  • Loading branch information
alex179ohm committed Jul 5, 2019
1 parent 71c0980 commit 6551df0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/array_serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ impl<S, Di> ArrayVisitor<S, Di> {
}
}

static ARRAY_FIELDS: &'static [&'static str] = &["v", "dim", "data"];
static ARRAY_FIELDS: &[&str] = &["v", "dim", "data"];

/// **Requires crate feature `"serde-1"`**
impl<'de, A, Di, S> Deserialize<'de> for ArrayBase<S, Di>
Expand Down
6 changes: 3 additions & 3 deletions src/arrayformat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ enum PrintableCell {
fn to_be_printed(length: usize, limit: usize) -> Vec<PrintableCell> {
if length <= 2 * limit {
(0..length)
.map(|x| PrintableCell::ElementIndex(x))
.map(PrintableCell::ElementIndex)
.collect()
} else {
let mut v: Vec<PrintableCell> =
(0..limit).map(|x| PrintableCell::ElementIndex(x)).collect();
(0..limit).map(PrintableCell::ElementIndex).collect();
v.push(PrintableCell::Ellipses);
v.extend((length - limit..length).map(|x| PrintableCell::ElementIndex(x)));
v.extend((length - limit..length).map(PrintableCell::ElementIndex));
v
}
}
Expand Down

0 comments on commit 6551df0

Please sign in to comment.