File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ pub(crate) struct RingBuffer<T> {
77}
88
99impl < T > RingBuffer < T > {
10- /// Creates an empty RingBuffer with a specific capacity.
10+ /// Creates an empty [` RingBuffer`] with a specific capacity.
1111 pub fn new ( capacity : usize ) -> Self {
1212 Self { inner : VecDeque :: with_capacity ( capacity) , capacity }
1313 }
@@ -30,6 +30,6 @@ impl<T> RingBuffer<T> {
3030 }
3131
3232 pub fn clear ( & mut self ) {
33- self . inner . clear ( )
33+ self . inner . clear ( ) ;
3434 }
3535}
Original file line number Diff line number Diff line change @@ -148,12 +148,12 @@ pub fn spawn_log_consumers<N: Network>(
148148 }
149149
150150 if let ConsumerMode :: CollectLatest { .. } = mode {
151- if !collected. is_empty ( ) {
152- collected. reverse ( ) ; // restore chronological order
151+ if collected. is_empty ( ) {
152+ info ! ( "No latest logs collected" ) ;
153+ } else {
153154 info ! ( "Sending collected logs to consumer" ) ;
155+ collected. reverse ( ) ; // restore chronological order
154156 _ = sender. try_stream ( collected) . await ;
155- } else {
156- info ! ( "No latest logs collected" ) ;
157157 }
158158 }
159159 } ) ;
You can’t perform that action at this time.
0 commit comments