chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
080ee2e
)
at-currency: Use find_by_desc_glob
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 18:44:10 +0000
(19:44 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 1 May 2022 18:44:10 +0000
(19:44 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
apitest/at-currency.rs
patch
|
blob
|
history
diff --git
a/apitest/at-currency.rs
b/apitest/at-currency.rs
index dfb6f26c17fe565e70cdd20793aaca1a11a3875a..003d1ecd7d168f4e98ea4083d0d7039a82fb0958 100644
(file)
--- a/
apitest/at-currency.rs
+++ b/
apitest/at-currency.rs
@@
-12,13
+12,7
@@
impl Ctx {
let mut alice = self.connect_player(&self.alice)?;
let mut a_pieces = alice.pieces::<PIA>()?;
- let [bn] = a_pieces.iter_enumerated()
- .filter_map(|(i,p)| {
- if ! p.info["desc"].as_str()?.contains("400ƒ") { return None }
- Some(i)
- })
- .collect::<ArrayVec<_,1>>()
- .into_inner().unwrap();
+ let bn = a_pieces.find_by_desc_glob("*400ƒ*");
let other_pile = PosC::new(40,20);