work r/w loop okey

serial
Avril 4 years ago
parent d623b34f7f
commit 5fcb1fd6c3
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -10,7 +10,7 @@ pub fn work_on(job: &mut Job) -> Result<usize, Box<dyn std::error::Error>>
std::slice::from_raw_parts_mut(output.as_mut_ptr(), output.len())
};
let mut read=0;
loop {
while read < job.len() {
match job.read(&mut output[read..])? {
0 => break,
current => read+=current,

Loading…
Cancel
Save