Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
let pieces = session.pieces()?;
let [hand] = pieces.into_iter()
- .filter(|p| p.info["desc"] == "a hand repository")
+ .filter(|p| p.info["desc"] == otter::hand::UNCLAIMED_DESC)
.collect::<ArrayVec<[_;1]>>()
.into_inner().unwrap();
dbg!(hand);
use crate::prelude::*;
//use super::*;
+pub const UNCLAIMED_DESC: &str = "a hand repository";
+
#[derive(Debug,Clone,Serialize,Deserialize)]
struct MagicOwner {
player: PlayerId,
if let Some(xdata) = xdata;
if let Some(owner) = &xdata.owner;
then { owner.desc.clone() }
- else { Html(format!("a hand repository")) }
+ else { Html(UNCLAIMED_DESC.into()) }
}
}
}