take_weakf
This commit is contained in:
parent
49f49194c5
commit
bcf0e23a4b
@ -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()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user