Change loops to iterators.

This commit is contained in:
Stephen Chung
2022-10-18 15:44:24 +08:00
parent c5a111ddb2
commit 4642895de8
4 changed files with 137 additions and 183 deletions

View File

@@ -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();