Remove unecessary .to_string #106

Merged
notplants merged 1 commits from to-string into main 2022-05-11 09:48:16 +00:00
Owner

was able to use

let pc_defaults: HashMap<String, String> = peach_config_defaults
        .iter()
        .map(|(key, val)| (key.to_string(), val.to_string()))
        .collect();

to convert a HashMap<&str, &str> into a HashMap<String, String>,

so that we don't need to write .to_string() on every single string in the defaults.

was able to use ``` let pc_defaults: HashMap<String, String> = peach_config_defaults .iter() .map(|(key, val)| (key.to_string(), val.to_string())) .collect(); ``` to convert a HashMap<&str, &str> into a HashMap<String, String>, so that we don't need to write .to_string() on every single string in the defaults.
notplants added 1 commit 2022-05-11 09:26:25 +00:00
continuous-integration/drone/pr Build is passing Details
b84e470a42
Remove unecessary .to_string
notplants requested review from glyph 2022-05-11 09:26:31 +00:00
glyph approved these changes 2022-05-11 09:39:45 +00:00
glyph left a comment
Owner

👍 🟢

👍 🟢
notplants merged commit bab33b602a into main 2022-05-11 09:48:16 +00:00
notplants deleted branch to-string 2022-05-11 09:48:17 +00:00
Sign in to join this conversation.
No description provided.