Change loops to iterators.
This commit is contained in:
@@ -440,18 +440,16 @@ impl Module {
|
||||
}
|
||||
first = false;
|
||||
|
||||
if f.access == FnAccess::Private {
|
||||
continue;
|
||||
if f.access != FnAccess::Private {
|
||||
#[cfg(not(feature = "no_custom_syntax"))]
|
||||
let operator = def.engine.custom_keywords.contains_key(&f.name)
|
||||
|| (!f.name.contains('$') && !is_valid_function_name(&f.name));
|
||||
|
||||
#[cfg(feature = "no_custom_syntax")]
|
||||
let operator = !f.name.contains('$') && !is_valid_function_name(&f.name);
|
||||
|
||||
f.write_definition(writer, def, operator)?;
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "no_custom_syntax"))]
|
||||
let operator = def.engine.custom_keywords.contains_key(&f.name)
|
||||
|| (!f.name.contains('$') && !is_valid_function_name(&f.name));
|
||||
|
||||
#[cfg(feature = "no_custom_syntax")]
|
||||
let operator = !f.name.contains('$') && !is_valid_function_name(&f.name);
|
||||
|
||||
f.write_definition(writer, def, operator)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
@@ -166,10 +166,7 @@ pub fn format_map_as_json(map: &Map) -> String {
|
||||
|
||||
if let Some(val) = value.read_lock::<Map>() {
|
||||
result.push_str(&format_map_as_json(&*val));
|
||||
continue;
|
||||
}
|
||||
|
||||
if value.is::<()>() {
|
||||
} else if value.is::<()>() {
|
||||
result.push_str("null");
|
||||
} else {
|
||||
write!(result, "{:?}", value).unwrap();
|
||||
|
Reference in New Issue
Block a user