Skip to content

Commit

Permalink
Simplify redundant arithmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Feb 11, 2022
1 parent 6c0e380 commit b64a580
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions quinn-proto/src/cid_queue.rs
Expand Up @@ -101,8 +101,7 @@ impl CidQueue {
let orig_offset = self.offset;
self.offset += i as u64;
self.cursor = (self.cursor + i) % Self::LEN;
let sequence = orig_offset + i as u64;
Some((cid_data.1.unwrap(), orig_offset..sequence))
Some((cid_data.1.unwrap(), orig_offset..self.offset))
}

/// Iterate CIDs in CidQueue that are not `None`, including the active CID
Expand Down

0 comments on commit b64a580

Please sign in to comment.