Skip to content

Commit

Permalink
Fixes needed since qlog 0.2 uses serde_json
Browse files Browse the repository at this point in the history
See rust-lang/rust#46257

This just requires us to be a little more explicit about types in a couple
places
  • Loading branch information
Andy Grover committed Apr 17, 2020
1 parent f7535e6 commit a4d7ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion neqo-transport/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ mod tests {
padded.extend_from_slice(EXTRA);
let (packet, remainder) = PublicPacket::decode(&padded, &cid_mgr()).unwrap();
assert_eq!(packet.packet_type(), PacketType::Initial);
assert_eq!(&packet.dcid()[..], &[]);
assert_eq!(&packet.dcid()[..], &[] as &[u8]);
assert_eq!(&packet.scid()[..], SERVER_CID);
assert!(packet.token().is_empty());
assert_eq!(remainder, EXTRA);
Expand Down
6 changes: 3 additions & 3 deletions test-fixture/src/assertions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
use std::convert::TryInto;

use neqo_common::Decoder;
use neqo_transport::QUIC_VERSION;
use neqo_transport::{Version, QUIC_VERSION};

// Do a simple decode of the datagram to verify that it is coalesced.
pub fn assert_coalesced_0rtt(payload: &[u8]) {
assert!(payload.len() >= 1200);
let mut dec = Decoder::from(payload);
let initial_type = dec.decode_byte().unwrap(); // Initial
assert_eq!(initial_type & 0b1111_0000, 0b1100_0000);
let version = dec.decode_uint(4).unwrap();
assert_eq!(version, QUIC_VERSION.into());
let version: Version = dec.decode_uint(4).unwrap().try_into().unwrap();
assert_eq!(version, QUIC_VERSION);
dec.skip_vec(1); // DCID
dec.skip_vec(1); // SCID
dec.skip_vvec();
Expand Down

0 comments on commit a4d7ab9

Please sign in to comment.