chiark / gitweb /
apitest: Promote PIA and PIB to where wdriver can use them
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2022 17:45:17 +0000 (18:45 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 12 Jun 2022 19:30:01 +0000 (20:30 +0100)
I thought I wanted this for replacing literal piece values in tests,
but actually I don't think I do since MGI::ListPieces and list_pieces
will do.  But there seems little harm in it, so keep it.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/apitest.rs
apitest/atmain.rs

index 2bbdf89fee74ca2fdb6ca763df21fa56d616cc9d..8bad2194918f050196601136e1d1bebb7f81a40a 100644 (file)
@@ -32,6 +32,13 @@ pub type MgmtChannel = ClientMgmtChannel;
 pub type JsV = serde_json::Value;
 pub type MC = MgmtCommand;
 
+mod pi {
+  use otter::prelude::define_index_type;
+  define_index_type!{ pub struct PIA = usize; }
+  define_index_type!{ pub struct PIB = usize; }
+}
+pub use pi::*;
+
 // -------------------- private crates ----------
 
 use otter_support::config::DAEMON_STARTUP_REPORT;
index 69b727a7ef4279721f08a31e06d8f4aa926313c9..743090e9597838a72cd2d589a11b73cf40ef87d1 100644 (file)
@@ -211,13 +211,6 @@ impl UsualCtx {
   }
 }
 
-mod pi {
-  use otter::prelude::define_index_type;
-  define_index_type!{ pub struct PIA = usize; }
-  define_index_type!{ pub struct PIB = usize; }
-}
-pub use pi::*;
-
 type Pieces<PI> = IndexVec<PI, PieceInfo<JsV /*~PreparedPieceState*/>>;
 type PiecesSlice<PI> = IndexSlice<PI,[PieceInfo<JsV>]>;