Skip to content

Commit 55c63bf

Browse files
Armin BecherArmin Becher
authored andcommitted
style: fix clippy warnings
1 parent 4ab3cb2 commit 55c63bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ impl<'de, T: Deserialize<'de>> Deserialize<'de> for Grid<T> {
295295
}
296296
}
297297

298-
const FIELDS: &'static [&'static str] = &["cols", "data", "order"];
298+
const FIELDS: &[&str] = &["cols", "data", "order"];
299299
deserializer.deserialize_struct("Grid", FIELDS, GridVisitor { _p: PhantomData })
300300
}
301301
}
@@ -3623,14 +3623,14 @@ mod test {
36233623
#[test]
36243624
fn deserialize() {
36253625
let s = "{ \"cols\": 2, \"data\": [1, 2, 3, 4] }";
3626-
let grid: Grid<u8> = serde_json::from_str(&s).unwrap();
3626+
let grid: Grid<u8> = serde_json::from_str(s).unwrap();
36273627
assert_eq!(grid, grid![[1, 2][3, 4]]);
36283628
}
36293629

36303630
#[test]
36313631
fn deserialize_with_order() {
36323632
let s = "{ \"cols\": 2, \"data\": [1, 3, 2, 4], \"order\": \"ColumnMajor\" }";
3633-
let grid: Grid<u8> = serde_json::from_str(&s).unwrap();
3633+
let grid: Grid<u8> = serde_json::from_str(s).unwrap();
36343634
test_grid(&grid, 2, 2, Order::ColumnMajor, &[1, 3, 2, 4]);
36353635
}
36363636
}

0 commit comments

Comments
 (0)