From 654e38aef79fb72e73e23a7a3f5dbc40c853152d Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 14 Nov 2022 15:06:23 +1100 Subject: [PATCH] Remove comment and improve variable naming --- yamux/src/connection.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/yamux/src/connection.rs b/yamux/src/connection.rs index 36708675..bd2b1f69 100644 --- a/yamux/src/connection.rs +++ b/yamux/src/connection.rs @@ -350,8 +350,7 @@ struct Active { streams: IntMap, stream_sender: mpsc::Sender, stream_receiver: mpsc::Receiver, - garbage: Vec, - // see `Connection::garbage_collect()` + dropped_streams: Vec, pending_frames: VecDeque>, } @@ -423,7 +422,7 @@ impl Active { Mode::Client => 1, Mode::Server => 2, }, - garbage: Vec::new(), + dropped_streams: Vec::new(), pending_frames: VecDeque::default(), } } @@ -912,9 +911,9 @@ impl Active { log::trace!("{}/{}: sending: {}", self.id, stream_id, f.header()); self.pending_frames.push_back(f.into()); } - self.garbage.push(stream_id) + self.dropped_streams.push(stream_id) } - for id in self.garbage.drain(..) { + for id in self.dropped_streams.drain(..) { self.streams.remove(&id); } }