Skip to content

Commit 6eb237d

Browse files
committed
Remove unreachable
1 parent 81ea09c commit 6eb237d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

async-ssh2-lite/src/session_stream/impl_tokio.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ impl AsyncSessionStream for TcpStream {
3535
}
3636

3737
match sess.block_directions() {
38-
BlockDirections::None => {
39-
unreachable!("")
40-
}
38+
BlockDirections::None => continue,
4139
BlockDirections::Inbound => {
4240
assert!(expected_block_directions.is_readable());
4341

@@ -77,9 +75,7 @@ impl AsyncSessionStream for TcpStream {
7775
}
7876

7977
match sess.block_directions() {
80-
BlockDirections::None => {
81-
unreachable!("")
82-
}
78+
BlockDirections::None => return Poll::Pending,
8379
BlockDirections::Inbound => {
8480
assert!(expected_block_directions.is_readable());
8581

0 commit comments

Comments
 (0)