zf.read_to_string(&mut catalogue_data)
.map_err(|e| LE::badlib(&libname, &e))?;
let mut src = LibraryInBundle {
- catalogue_data: catalogue_data,
+ catalogue_data,
svg_dir: &svg_dir,
need_svgs: Vec::new(),
id: &id,
use crate::prelude::*;
-pub const UNCLAIMED_HAND_DESC: &'static str = "a hand repository";
+pub const UNCLAIMED_HAND_DESC: &str = "a hand repository";
#[derive(Debug,Clone,Serialize,Deserialize)]
struct MagicOwner {
}
if let Some(held) = ns.held {
- ent.insert(PlHistLast { held: held, posx: new_posx });
+ ent.insert(PlHistLast { held, posx: new_posx });
} else {
ent.remove();
}
.map(|r| JsonString(r.clone()));
let (svg, bbox) = pri.make_defs(ioccults, gs, gpc, ipc)?;
let r = PreparedPieceState {
- pos : pos,
+ pos, svg, occregion, bbox,
held : gpc.held,
- svg : svg,
- bbox : bbox,
z : zlevel.z.clone(),
zg : zlevel.zg,
angle : pri.angle(gpc).to_compass(),
uos : pri.ui_operations(gs, gpc, ipc)?,
moveable : gpc.moveable(),
facehint : pri.facehint(gpc),
- occregion,
};
dbgc!(pri, ipc, gpc, r);
r
let pri = self;
let (svg, bbox) = pri.make_defs(ioccults, gs, gpc, ipc)?;
let r = PreparedPieceImage {
- svg : svg,
- bbox : bbox,
- uos : pri.ui_operations(gs, gpc, ipc)?,
+ svg, bbox,
+ uos: pri.ui_operations(gs, gpc, ipc)?,
};
dbgc!(pri, ipc, gpc, r);
r