|
|
@ -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())
|
|
|
|
std::slice::from_raw_parts_mut(output.as_mut_ptr(), output.len())
|
|
|
|
};
|
|
|
|
};
|
|
|
|
let mut read=0;
|
|
|
|
let mut read=0;
|
|
|
|
loop {
|
|
|
|
while read < job.len() {
|
|
|
|
match job.read(&mut output[read..])? {
|
|
|
|
match job.read(&mut output[read..])? {
|
|
|
|
0 => break,
|
|
|
|
0 => break,
|
|
|
|
current => read+=current,
|
|
|
|
current => read+=current,
|
|
|
|