diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-01-07 09:44:35 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-01-07 09:44:35 +0200 |
commit | 3b4b8c537f472c7ec8d90eb79d70fce11a13669c (patch) | |
tree | 9f0fd587a74882b458ed92c47561ba0c6cf8d666 | |
parent | 679026db532529c310e5b1a4799a957939320698 (diff) | |
download | obnam2-3b4b8c537f472c7ec8d90eb79d70fce11a13669c.tar.gz |
refactor: use idiom to iterate over keys in HashMap
Found by clippy.
Sponsored-by: author
-rw-r--r-- | src/chunkstore.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chunkstore.rs b/src/chunkstore.rs index 750b68b..4c8125c 100644 --- a/src/chunkstore.rs +++ b/src/chunkstore.rs @@ -157,7 +157,7 @@ impl RemoteStore { let hits: HashMap<String, ChunkMeta> = serde_json::from_slice(&body).map_err(StoreError::JsonParse)?; - let ids = hits.iter().map(|(id, _)| ChunkId::recreate(id)).collect(); + let ids = hits.keys().map(|id| ChunkId::recreate(id)).collect(); Ok(ids) } |