@@ -15,14 +15,11 @@ use pin_project_lite::pin_project;
1515use proto:: { ConnectionError , ConnectionHandle , ConnectionStats , Dir , StreamEvent , StreamId } ;
1616use rustc_hash:: FxHashMap ;
1717use thiserror:: Error ;
18- use tokio:: {
19- sync:: { futures:: Notified , mpsc, oneshot, Notify } ,
20- time:: Instant as TokioInstant ,
21- } ;
22- use tokio_util:: time:: delay_queue;
18+ use tokio:: sync:: { futures:: Notified , mpsc, oneshot, Notify } ;
2319use tracing:: debug_span;
2420
2521use crate :: {
22+ delay_queue:: Timer ,
2623 mutex:: Mutex ,
2724 recv_stream:: RecvStream ,
2825 send_stream:: { SendStream , WriteError } ,
@@ -784,8 +781,8 @@ pub(crate) struct State {
784781 on_handshake_data : Option < oneshot:: Sender < ( ) > > ,
785782 on_connected : Option < oneshot:: Sender < bool > > ,
786783 connected : bool ,
787- pub ( crate ) timer_handle : Option < delay_queue :: Key > ,
788- pub ( crate ) timer_deadline : Option < TokioInstant > ,
784+ pub ( crate ) timer_handle : Option < Timer > ,
785+ pub ( crate ) timer_deadline : Option < Instant > ,
789786 pub ( crate ) blocked_writers : FxHashMap < StreamId , Waker > ,
790787 pub ( crate ) blocked_readers : FxHashMap < StreamId , Waker > ,
791788 pub ( crate ) finishing : FxHashMap < StreamId , oneshot:: Sender < Option < WriteError > > > ,
0 commit comments