From 3f4aca4df1c66b7ccd71eb425e4b4cdbcaf58e3c Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 26 Feb 2021 11:15:41 +0000 Subject: [PATCH] apitest: process pieces Signed-off-by: Ian Jackson --- apitest.rs | 1 + apitest/at-otter.rs | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apitest.rs b/apitest.rs index 076e88f7..c245559d 100644 --- a/apitest.rs +++ b/apitest.rs @@ -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; diff --git a/apitest/at-otter.rs b/apitest/at-otter.rs index fda71406..c438f172 100644 --- a/apitest/at-otter.rs +++ b/apitest/at-otter.rs @@ -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::>().into_inner().unwrap(); + dbg!(llm); // xxx find load markers ids // xxx find load markers' locations -- 2.30.2