Skip to content

Commit f526c9c

Browse files
committed
Remove unreachable
1 parent 6eb237d commit f526c9c

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ where
3636
}
3737

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

@@ -80,9 +78,7 @@ where
8078
}
8179

8280
match sess.block_directions() {
83-
BlockDirections::None => {
84-
unreachable!("")
85-
}
81+
BlockDirections::None => return Poll::Pending,
8682
BlockDirections::Inbound => {
8783
assert!(expected_block_directions.is_readable());
8884

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ impl AsyncSessionStream for UnixStream {
131131
}
132132

133133
match sess.block_directions() {
134-
BlockDirections::None => {
135-
unreachable!("")
136-
}
134+
BlockDirections::None => continue,
137135
BlockDirections::Inbound => {
138136
assert!(expected_block_directions.is_readable());
139137

@@ -173,9 +171,7 @@ impl AsyncSessionStream for UnixStream {
173171
}
174172

175173
match sess.block_directions() {
176-
BlockDirections::None => {
177-
unreachable!("")
178-
}
174+
BlockDirections::None => return Poll::Pending,
179175
BlockDirections::Inbound => {
180176
assert!(expected_block_directions.is_readable());
181177

0 commit comments

Comments
 (0)