loop {
match stream.write(&buffer) {
Ok(_) => break,
_ => {}
}
}
Is there a way to write it on a more readable/idiomatic way? I don't need to do anything inside the match, I don't need any actions after the Ok or after the Err, because the buffer is updated as a reference whenever it returns Ok.
Something like:
while match some_fn() != Ok() {
...
}