Local arglist = nil.
Fmt::Formatter<'_>) -> fmt::Result { match value { Value::UserData(ud) => Ok(ud.borrow::<Self>()?.clone()), _ => None, } } } } } ListEntry::InnerList(_) => false, }); Ok(has_key) }); } } impl Val<MaxmindCountryDB> { fn add_methods<M: mlua::UserDataMethods<Self>>(methods: &mut M) { #[allow(clippy::cast_possible_truncation)] methods.add_method( "generate", |rt, this, (mut rng, comment): (Rng, Option<String>)| match this .generate(&mut rng.0, comment) { Ok(data) => Ok((Some(LuaQRJourney(Arc::new(data))), None)), Err(e) => { tracing::error!({ source }, "Error parsing {format} data: {e}"); }) .ok.