Skip to content

Commit

Permalink
finish zip todo
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Apr 26, 2024
1 parent 2501d4a commit 68a9196
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pingora-core/src/server/transfer_fd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@ impl Fds {
}

pub fn deserialize(&mut self, binds: Vec<String>, fds: Vec<RawFd>) {
assert!(binds.len() == fds.len());
// TODO: use zip()
for i in 0..binds.len() {
self.map.insert(binds[i].clone(), fds[i]);
assert_eq!(binds.len(), fds.len());
for (bind, fd) in binds.into_iter().zip(fds) {
self.map.insert(bind, fd);
}
}

Expand Down

0 comments on commit 68a9196

Please sign in to comment.