}
};
let spec = shapelib::ItemSpec {
- lib: it.libname.clone(),
+ lib: it.lib.libname.clone(),
item: it.itemname.as_str().to_owned(),
};
let spec = PiecesSpec {
}
let mut pieces: Vec<Prep> = items.into_iter().map(|it| {
- let spec = ItemSpec { lib: it.libname.into(), item: it.itemname.into() };
+ let spec = ItemSpec {
+ lib: it.lib.libname.into(),
+ item: it.itemname.into(),
+ };
let sortkey = it.sortkey;
(||{
let (p, _occultable) = spec.clone()
#[derive(Debug,Clone,Serialize,Deserialize,Eq,PartialEq,Ord,PartialOrd)]
pub struct ItemEnquiryData {
- pub libname: String,
+ pub lib: LibraryEnquiryData,
pub itemname: GoodItemName,
pub sortkey: Option<String>,
pub f0desc: Html,
impl Display for ItemEnquiryData {
#[throws(fmt::Error)]
fn fmt(&self, f: &mut Formatter) {
- write!(f, "{:<10} {:20} {}", &self.libname, &self.itemname,
+ write!(f, "{:<10} {:20} {}", &self.lib, &self.itemname,
self.f0desc.as_html_str())?;
}
}
};
let f0bbox = loaded.bbox_approx()?;
let ier = ItemEnquiryData {
- libname: self.libname.clone(),
+ lib: self.enquiry(),
itemname: (**k).to_owned(),
sortkey: v.sort.to_owned(),
f0bbox,