3 ms·
The same code with `await` :) let (reader, vec) = await { io.read_until(reader, b'\n', Vec::new() }?; if vec.len() == 0 { return Err(Error::new
by tatterdemalion 8y ago
The same code with `await` :)
let (reader, vec) = await { io.read_until(reader, b'\n', Vec::new() }?;
if vec.len() == 0 {
return Err(Error::new(ErrorKind::BrokenPipe, "broken pipe"));
}
let string = String::from_utf8(vec)?;