From 708449851283b57eb6f514c8f289b66e982720b3 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Fri, 1 Mar 2024 20:27:47 +0100 Subject: [PATCH] Fix warnings --- src/sys/windows/mod.rs | 4 +++- tests/poll.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sys/windows/mod.rs b/src/sys/windows/mod.rs index f8b72fc49..89d74b1a2 100644 --- a/src/sys/windows/mod.rs +++ b/src/sys/windows/mod.rs @@ -13,7 +13,7 @@ mod overlapped; use overlapped::Overlapped; mod selector; -pub use selector::{Selector, SelectorInner, SockState}; +pub use selector::Selector; // Macros must be defined before the modules that use them cfg_net! { @@ -35,6 +35,8 @@ cfg_net! { pub(crate) mod tcp; pub(crate) mod udp; + + pub use selector::{SelectorInner, SockState}; } cfg_os_ext! { diff --git a/tests/poll.rs b/tests/poll.rs index 22db7b739..a13e360c1 100644 --- a/tests/poll.rs +++ b/tests/poll.rs @@ -581,7 +581,7 @@ fn poll_registration() { let interests = Interest::READABLE; registry.register(&mut source, token, interests).unwrap(); assert_eq!(source.registrations.len(), 1); - assert_eq!(source.registrations.get(0), Some(&(token, interests))); + assert_eq!(source.registrations.first(), Some(&(token, interests))); assert!(source.reregistrations.is_empty()); assert_eq!(source.deregister_count, 0); @@ -593,7 +593,7 @@ fn poll_registration() { assert_eq!(source.registrations.len(), 1); assert_eq!(source.reregistrations.len(), 1); assert_eq!( - source.reregistrations.get(0), + source.reregistrations.first(), Some(&(re_token, re_interests)) ); assert_eq!(source.deregister_count, 0);