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();