This repository was archived by the owner on Oct 19, 2024. It is now read-only.
This repository was archived by the owner on Oct 19, 2024. It is now read-only.
Use HashMap::from
for immediate-use hashmaps initialization #511
Closed
Description
Is your feature request related to a problem? Please describe.
Currently, to initialize a HashMap that's intended to be used immediately with some values, we do
ethers-rs/ethers-etherscan/src/lib.rs
Lines 129 to 131 in 4608ddd
Rust 1.56.0 introduces a new way to do so:
let body = self.create_query("contract", "checkverifystatus", HashMap::from([
("guid", guid.as_ref()),
]));
thanks to const generics. Release with that feature is planned to be on 2021-10-21.
Describe the solution you'd like
Replace existing hashmap initializations with proposed solution.
Metadata
Metadata
Assignees
Labels
No labels