Skip to content

Commit

Permalink
avoid unnecessary collect
Browse files Browse the repository at this point in the history
Signed-off-by: clux <sszynrae@gmail.com>
  • Loading branch information
clux committed May 23, 2024
1 parent 2f24234 commit 4f69a37
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kube-runtime/src/reflector/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ where
watcher::Event::InitPage(new_objs) => {
let new_objs = new_objs
.iter()
.map(|obj| (obj.to_object_ref(self.dyntype.clone()), Arc::new(obj.clone())))
.collect::<AHashMap<_, _>>();
.map(|obj| (obj.to_object_ref(self.dyntype.clone()), Arc::new(obj.clone())));
self.buffer.extend(new_objs);
}
watcher::Event::InitApply(obj) => {
Expand Down

0 comments on commit 4f69a37

Please sign in to comment.