mirror of
https://github.com/async-rs/async-std.git
synced 2025-03-31 13:36:41 +00:00
refactor: change to as_mut
This commit is contained in:
parent
6cbf48f12d
commit
7d616c695d
1 changed files with 1 additions and 4 deletions
|
@ -44,15 +44,12 @@ where
|
||||||
|
|
||||||
match next {
|
match next {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
let mut res = this.res.take().unwrap();
|
let res = this.res.as_mut().unwrap();
|
||||||
|
|
||||||
if (this.f)(&v) {
|
if (this.f)(&v) {
|
||||||
res.0.extend(Some(v))
|
res.0.extend(Some(v))
|
||||||
} else {
|
} else {
|
||||||
res.1.extend(Some(v))
|
res.1.extend(Some(v))
|
||||||
}
|
}
|
||||||
|
|
||||||
*this.res = Some(res);
|
|
||||||
}
|
}
|
||||||
None => return Poll::Ready(this.res.take().unwrap()),
|
None => return Poll::Ready(this.res.take().unwrap()),
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue