Code style and docs.
This commit is contained in:
@@ -108,8 +108,8 @@ fn collect_fn_metadata(ctx: NativeCallContext) -> crate::Array {
|
||||
list.push(make_metadata(dict, Some(namespace.clone()), f).into())
|
||||
});
|
||||
module.iter_sub_modules().for_each(|(ns, m)| {
|
||||
let ns: ImmutableString = format!("{}::{}", namespace, ns).into();
|
||||
scan_module(list, dict, ns, m.as_ref())
|
||||
let ns = format!("{}::{}", namespace, ns);
|
||||
scan_module(list, dict, ns.into(), m.as_ref())
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -29,15 +29,11 @@ mod map_functions {
|
||||
}
|
||||
#[rhai_fn(name = "mixin", name = "+=")]
|
||||
pub fn mixin(map: &mut Map, map2: Map) {
|
||||
map2.into_iter().for_each(|(key, value)| {
|
||||
map.insert(key, value);
|
||||
});
|
||||
map.extend(map2.into_iter());
|
||||
}
|
||||
#[rhai_fn(name = "+")]
|
||||
pub fn merge(mut map: Map, map2: Map) -> Map {
|
||||
map2.into_iter().for_each(|(key, value)| {
|
||||
map.insert(key, value);
|
||||
});
|
||||
map.extend(map2.into_iter());
|
||||
map
|
||||
}
|
||||
pub fn fill_with(map: &mut Map, map2: Map) {
|
||||
|
Reference in New Issue
Block a user