}
impl<'f,T,F> TypedAction<T> for MapStore<T,F>
-where F : 'f + Clone + FnMut(&str) -> Result<T,String>,
- 'f : 'static // ideally TypedAction wuld have a lifetime parameter
+where F: 'f + Clone + FnMut(&str) -> Result<T,String>,
+ 'f: 'static // ideally TypedAction wuld have a lifetime parameter
{
fn bind<'x>(&self, r: Rc<RefCell<&'x mut T>>) -> Action<'x> {
Action::Single(Box::new(BoundMapStore {
chan
}
-const PLAYER_ALWAYS_PERMS : &[TablePermission] = &[
+const PLAYER_ALWAYS_PERMS: &[TablePermission] = &[
TP::TestExistence,
TP::ViewNotSecret,
TP::Play,
];
-const PLAYER_DEFAULT_PERMS : &[TablePermission] = &[
+const PLAYER_DEFAULT_PERMS: &[TablePermission] = &[
TP::ChangePieces,
];
None => {
let MgmtGameResponseGameInfo { links, .. } = chan.info()?;
for (tk, v) in links {
- let v : Url = (&v).try_into().context("reparse sererr's UrlSpec")?;
+ let v: Url = (&v).try_into().context("reparse sererr's UrlSpec")?;
match args.kind {
None => {
println!("{:<10} {}", tk, &v);
} } }
impl LibGlobArgs {
- fn add_arguments<'ap, 'tlg : 'ap>(
+ fn add_arguments<'ap, 'tlg: 'ap>(
&'tlg mut self,
ap: &'_ mut ArgumentParser<'ap>
) {
}
fn call(_sc: &Subcommand, ma: MainOpts, args: Vec<String>) ->Result<(),AE> {
- const MAGIC : &str = "mgmt-library-load-marker";
+ const MAGIC: &str = "mgmt-library-load-marker";
let args = parse_args::<Args,_>(args, &subargs, &ok_id, None);
let mut chan = access_game(&ma, &args.table_name)?;
}
}
- let mut pieces : Vec<Prep> = items.into_iter().map(|it| {
+ let mut pieces: Vec<Prep> = items.into_iter().map(|it| {
let spec = ItemSpec { lib: it.0, item: it.1.itemname };
(||{
let pc = spec.clone().load().context("load")?;
let tlibs = Config1::PathGlob(libs.to_owned());
load(&vec![tlibs.clone()])?;
}
- let mut items : Vec<ItemForOutput> =
+ let mut items: Vec<ItemForOutput> =
libs_list()
.into_iter()
.map(|lib| {