[rs] Staging belt: do not panic by unwrapping send result in recall (fixes #634)

This commit is contained in:
Greg V 2020-11-24 18:58:52 +03:00
parent 0735ba6d28
commit 6b00ebf94d

View File

@ -140,7 +140,10 @@ impl StagingBelt {
.buffer .buffer
.slice(..) .slice(..)
.map_async(MapMode::Write) .map_async(MapMode::Write)
.inspect(move |_| sender.send(chunk).unwrap()) .inspect(move |_| {
// The only possible error is the other side disconnecting, which is fine
let _ = sender.send(chunk);
})
})) }))
.map(|_| ()) .map(|_| ())
} }