fix cancellation construction

This commit is contained in:
yggverse 2024-12-01 03:59:36 +02:00
parent 99583aa719
commit 2df9f36599

View file

@ -64,7 +64,10 @@ impl Connection {
/// * return `Error` on `Cancellable` not found
pub fn cancel(&self) -> Result<(), Error> {
match self.cancellable {
Some(ref cancellable) => Ok(cancellable.cancel()),
Some(ref cancellable) => {
cancellable.cancel();
Ok(())
}
None => Err(Error::Cancel),
}
}