Update to rust edition 2021 everywhere (#1086)

* chore: update to rust edition 2021 everywhere

* validator-api: simplify into_iter call in rust 2021
This commit is contained in:
Jon Häggblad
2022-02-01 13:28:02 +01:00
committed by GitHub
parent 9f0971f8a9
commit c6e41ca3f3
47 changed files with 49 additions and 50 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ authors = [
"Jędrzej Stuczyński <andrew@nymtech.net>",
"Drazen Urch <durch@users.noreply.github.com>",
]
edition = "2018"
edition = "2021"
rust-version = "1.56"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
@@ -23,13 +23,12 @@ impl TestRoute {
l3_mix: mix::Node,
gateway: gateway::Node,
) -> Self {
// When somebody gets to refactor this in the future and Rust 2021 is being used,
// the call could be changed to a simple `.into_iter()`
let layered_mixes = IntoIterator::into_iter([
let layered_mixes = [
(1u8, vec![l1_mix]),
(2u8, vec![l2_mix]),
(3u8, vec![l3_mix]),
])
]
.into_iter()
.collect();
TestRoute {