chiark / gitweb /
jstest: lower: introduce Vpid
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 9 Jul 2021 16:56:57 +0000 (17:56 +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

index ef494309cb516be031aad174bb4d439a7bd6d466..41cd47c6445fa4997fe860483e5e41e97409e795 100644 (file)
@@ -4,6 +4,8 @@
 
 use otter_nodejs_tests::*;
 
+pub type Vpid = VisiblePieceId;
+
 #[derive(StructOpt,Debug,Clone)]
 pub struct Opts {
   pub nodejs: String,
@@ -44,8 +46,8 @@ pub struct Tests {
 pub struct Test {
   name: String,
   #[serde(with = "indexmap::serde_seq")]
-  pieces: IndexMap<VisiblePieceId, StartPiece>,
-  targets: Vec<VisiblePieceId>,
+  pieces: IndexMap<Vpid, StartPiece>,
+  targets: Vec<Vpid>,
 }
 
 #[derive(Debug)]
@@ -77,7 +79,7 @@ impl Test {
       struct Nbt<'o,'n> {
         old_z: &'o ZCoord,
         new_z: &'n ZCoord,
-        id: VisiblePieceId,
+        id: Vpid,
       }
       let mut nbts = self.targets.iter()
         .filter_map(|&id| {