From f5f739cd994017cdac7de4814a5c29049498b04c Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Wed, 14 Aug 2024 21:51:47 -0700 Subject: [PATCH] Don't use deprecated APIs in tests Signed-off-by: Alex Saveau --- tests/event/epoll.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/event/epoll.rs b/tests/event/epoll.rs index 7aa64b523..39ca0bae2 100644 --- a/tests/event/epoll.rs +++ b/tests/event/epoll.rs @@ -41,10 +41,10 @@ fn server(ready: Arc<(Mutex, Condvar)>) { let mut next_data = epoll::EventData::new_u64(2); let mut targets = HashMap::new(); - let mut event_list = epoll::EventVec::with_capacity(4); + let mut event_list = Vec::with_capacity(4); loop { epoll::wait(&epoll, &mut event_list, -1).unwrap(); - for event in &event_list { + for event in event_list.drain(..) { let target = event.data; if target.u64() == 1 { let conn_sock = accept(&listen_sock).unwrap();