How does for loop implement into_iter

Follow up this question which is marked as duplicate as question here. The concept of how for loop implement into_iter keeps haunt me down and this answer kinda creates more question to me like the terms of re-borrow, which is not mentioned in rust official document at all except in one place. To my understanding… Read More How does for loop implement into_iter

Parsing Yaml file

For the last 3 days now, I tried to figure out how to parse my yaml in Rust. And I can’t figure out why it doesn’t work. My Yaml: default_verbosity: 0 logging: use_color: True, log_color: fatal: Red, error: Red, warn: Red, info: Green, debug: Blue, trace: Yellow log_output: file, file_location: "example.log" rocket: mount_location: "/", port:… Read More Parsing Yaml file

How to modify the value of only one of the keyvalues in the json array of js and keep the others?

This is the data that needs to be processed let test=[ { "id": 28620, "name": "fenbi1", "dn": "chl" }, { "id": 5941, "name": "fenbi2", "dn": "chl" }, { "id": 5226, "name": "fenbi3", "dn": "chl" }] The requirement is to change only dn to ch the changed value is let test=[ { "id": 28620, "name": "fenbi1",… Read More How to modify the value of only one of the keyvalues in the json array of js and keep the others?