mirror of
https://github.com/cloudflare/pingora.git
synced 2024-09-20 02:31:35 +02:00
finish zip todo
Includes-commit: 68a9196642
Replicated-from: https://github.com/cloudflare/pingora/pull/214
This commit is contained in:
parent
2a449ac305
commit
4347ef4471
2 changed files with 4 additions and 5 deletions
2
.bleep
2
.bleep
|
@ -1 +1 @@
|
|||
f753f291f3b4c478428b8233cc472d153650eecf
|
||||
b5cb1b6f679bf1dcd136617b0212eb4f7c4bce84
|
|
@ -55,10 +55,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue