mirror of
https://github.com/n0-computer/noq.git
synced 2026-09-25 12:57:07 +00:00
Remove dead state
This field was always `true`.
This commit is contained in:
committed by
Dirkjan Ochtman
parent
ed164fc458
commit
2cb44d06e4
@@ -246,8 +246,8 @@ impl<'a> Chunks<'a> {
|
||||
self.state = ChunksState::Error(e.clone(), st);
|
||||
return Err(e);
|
||||
}
|
||||
ChunksState::Finished(st) => {
|
||||
self.state = ChunksState::Finished(st);
|
||||
ChunksState::Finished => {
|
||||
self.state = ChunksState::Finished;
|
||||
return Ok(None);
|
||||
}
|
||||
ChunksState::Finalized => panic!("must not call next() after finalize()"),
|
||||
@@ -284,7 +284,7 @@ impl<'a> Chunks<'a> {
|
||||
ShouldTransmit(false),
|
||||
max_streams_dirty,
|
||||
);
|
||||
self.state = ChunksState::Finished(ShouldTransmit(true));
|
||||
self.state = ChunksState::Finished;
|
||||
Ok(None)
|
||||
} else {
|
||||
let should_transmit =
|
||||
@@ -312,7 +312,11 @@ impl<'a> Chunks<'a> {
|
||||
self.streams.recv.insert(self.id, rs);
|
||||
should_transmit
|
||||
}
|
||||
ChunksState::Finished(should_transmit) | ChunksState::Error(_, should_transmit) => {
|
||||
ChunksState::Finished => {
|
||||
debug_assert!(!drop);
|
||||
ShouldTransmit(true)
|
||||
}
|
||||
ChunksState::Error(_, should_transmit) => {
|
||||
debug_assert!(!drop);
|
||||
should_transmit
|
||||
}
|
||||
@@ -343,7 +347,7 @@ impl<'a> Drop for Chunks<'a> {
|
||||
enum ChunksState {
|
||||
Readable(Recv),
|
||||
Error(ReadError, ShouldTransmit),
|
||||
Finished(ShouldTransmit),
|
||||
Finished,
|
||||
Finalized,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user