我想检查 a 是否HashMap<i32, i32>包含任何大于零的值。我有这个代码:
HashMap<i32, i32>
let has_demand = minimums.iter().any(|*x| x > 0)
这失败了。问题出在|*x|,但我不知道该放什么。
|*x|
hashmap any rust
any ×1
hashmap ×1
rust ×1