Skip to content

Commit

Permalink
ci: fix nightly changes
Browse files Browse the repository at this point in the history
  • Loading branch information
da2ce7 committed Nov 7, 2023
1 parent 8ec0a23 commit dbc8920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions contrib/bencode/src/access/dict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub trait BDictAccess<K, V> {

impl<'a, V> BDictAccess<&'a [u8], V> for BTreeMap<&'a [u8], V> {
fn to_list(&self) -> Vec<(&&'a [u8], &V)> {
#[allow(clippy::map_identity)]
self.iter().map(|(k, v)| (k, v)).collect()
}

Expand All @@ -43,6 +44,7 @@ impl<'a, V> BDictAccess<&'a [u8], V> for BTreeMap<&'a [u8], V> {

impl<'a, V> BDictAccess<Cow<'a, [u8]>, V> for BTreeMap<Cow<'a, [u8]>, V> {
fn to_list(&self) -> Vec<(&Cow<'a, [u8]>, &V)> {
#[allow(clippy::map_identity)]
self.iter().map(|(k, v)| (k, v)).collect()
}

Expand Down
5 changes: 3 additions & 2 deletions src/servers/udp/connection_cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,12 @@ mod tests {
#[test]
fn it_should_make_a_connection_cookie() {
// Note: This constant may need to be updated in the future as the hash is not guaranteed to to be stable between versions.
const ID_COOKIE: Cookie = [23, 204, 198, 29, 48, 180, 62, 19];
const ID_COOKIE_OLD: Cookie = [23, 204, 198, 29, 48, 180, 62, 19];
const ID_COOKIE_NEW: Cookie = [41, 166, 45, 246, 249, 24, 108, 203];

let cookie = make(&SocketAddr::new(IpAddr::V4(Ipv4Addr::UNSPECIFIED), 0));

assert_eq!(cookie, ID_COOKIE);
assert!(cookie == ID_COOKIE_OLD || cookie == ID_COOKIE_NEW);
}

#[test]
Expand Down

0 comments on commit dbc8920

Please sign in to comment.