do not unwrap stream write, TcpStream::shutdown results (#492)

This commit is contained in:
Mark Thom
2020-05-12 18:51:34 -06:00
parent 23f804eda3
commit 3c6149fd27
2 changed files with 3 additions and 3 deletions

View File

@@ -2065,13 +2065,13 @@ impl MachineState {
match Number::try_from((addr, &self.heap)) {
Ok(Number::Integer(n)) => {
if let Some(nb) = n.to_u8() {
stream.write(&mut [nb]).unwrap();
discard_result!(stream.write(&mut [nb]));
return return_from_clause!(self.last_call, self);
}
}
Ok(Number::Fixnum(n)) => {
if let Ok(nb) = u8::try_from(n) {
stream.write(&mut [nb]).unwrap();
discard_result!(stream.write(&mut [nb]));
return return_from_clause!(self.last_call, self);
}
}