Comment Comment by tatterdemalion 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)?; parent tatterdemalion 8 years ago