Map::keys and Map::values can be used method-call style.

This commit is contained in:
Stephen Chung
2020-10-15 22:11:40 +08:00
parent 3b99b8f166
commit fb05e811b7
4 changed files with 35 additions and 8 deletions

View File

@@ -61,10 +61,10 @@ fn test_for_object() -> Result<(), Box<EvalAltResult>> {
let keys = "";
let map = #{a: 1, b: 2, c: 3};
for key in keys(map) {
for key in map.keys() {
keys += key;
}
for value in values(map) {
for value in map.values() {
sum += value;
}