take_weakf

This commit is contained in:
Robert Habermeier 2017-02-09 13:24:03 +01:00
parent 49f49194c5
commit bcf0e23a4b

View File

@ -22,7 +22,16 @@ macro_rules! take_weak {
($weak: expr) => {
match $weak.upgrade() {
Some(arc) => arc,
None => return Err(Error::internal_error())
None => return Err(Error::internal_error()),
}
}
}
macro_rules! take_weakf {
($weak: expr) => {
match $weak.upgrade() {
Some(arc) => arc,
None => return ::futures::future::err(Error::internal_error()),
}
}
}