chiark / gitweb /
jstest: Make targets be an IndexVec
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Jul 2021 17:24:09 +0000 (18:24 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Jul 2021 17:24:34 +0000 (18:24 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
jstest/jst-lower.rs
jstest/jstest.rs

index c52d028dd15d986fdd679f3da1b8105cc016b18a..dbbbf9439a4e4082e2d5b044a38ac34f019efa1f 100644 (file)
@@ -47,7 +47,7 @@ pub struct Test {
   name: String,
   #[serde(with = "indexmap::serde_seq")]
   pieces: IndexMap<Vpid, StartPiece>,
-  targets: Vec<Vpid>,
+  targets: IndexSet<Vpid>,
 }
 
 #[derive(Debug)]
@@ -196,7 +196,7 @@ impl TestsAccumulator {
 
     let targets = targets.into_iter().map(
       |s| s.try_into().unwrap()
-    ).collect_vec();
+    ).collect();
 
     let test = Test {
       name: name.into(),
index 74de17d45e7f21c6e74896c112e166548f23811b..410947caf2a162bf2a347cbe1393be3bcb4547af 100644 (file)
@@ -8,4 +8,5 @@ pub use otter_api_tests::Explode;
 pub use otter::imports::tera_standalone as tera;
 
 pub use indexmap::IndexMap;
+pub use indexmap::IndexSet;
 pub use structopt::StructOpt;