🐛 bug: use Result

main
_ 2021-07-18 23:16:44 +00:00
parent 12fdd4c842
commit 2a58d86b5c
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ pub async fn p4_expect_p5_request (
bail! ("P4 expected CONNECT_P2_TO_P5 but P2 sent something different"); bail! ("P4 expected CONNECT_P2_TO_P5 but P2 sent something different");
} }
let mut port_buf = [0, 0]; let mut port_buf = [0, 0];
recv.read_exact (&mut port_buf).await; recv.read_exact (&mut port_buf).await?;
let port = u16::from_le_bytes (port_buf); let port = u16::from_le_bytes (port_buf);
Ok (P2ConnectToP5Request { Ok (P2ConnectToP5Request {