chiark / gitweb /
apitest: process pieces
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 26 Feb 2021 11:15:41 +0000 (11:15 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 26 Feb 2021 11:15:41 +0000 (11:15 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest.rs
apitest/at-otter.rs

index 076e88f7f129b5bbb346f698d65e06e2821727a9..c245559d0cd2bc7b3e7403539ffee1045a5a2b10 100644 (file)
@@ -15,6 +15,7 @@ pub use imports::*;
 
 pub use anyhow::{anyhow, ensure, Context};
 
+pub use arrayvec::ArrayVec;
 pub use boolinator::Boolinator;
 pub use fehler::{throw, throws};
 pub use if_chain::if_chain;
index fda714069503888346a21d2b7e34b4fabe26d5ff..c438f172552ac86edf87a4f09e1536b0d9f8086b 100644 (file)
@@ -163,11 +163,10 @@ impl Ctx {
                Some(EXIT_NOTFOUND));
 
     let session = self.connect_player(&self.alice)?;
-
-    for (_, info) in session.pieces()? {
-      let desc = &info["desc"];
-      dbg!(&desc);
-    }
+    let llm: [_;2] = session.pieces()?.into_iter()
+      .filter(|(_,info)| info["desc"] == "a library load area marker")
+      .collect::<ArrayVec<_>>().into_inner().unwrap();
+    dbg!(llm);
     // xxx find load markers ids
 
     // xxx find load markers' locations