mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-23 16:56:46 +00:00
use as_mut
for stream-partition
This commit is contained in:
parent
693a7257b8
commit
a69b3a8a9e
1 changed files with 1 additions and 3 deletions
|
@ -45,13 +45,11 @@ where
|
||||||
|
|
||||||
match next {
|
match next {
|
||||||
Some(v) => {
|
Some(v) => {
|
||||||
let mut res = this.res.take().unwrap();
|
let res = this.res.as_mut().unwrap();
|
||||||
match (this.f)(&v) {
|
match (this.f)(&v) {
|
||||||
true => res.0.extend(Some(v)),
|
true => res.0.extend(Some(v)),
|
||||||
false => res.1.extend(Some(v)),
|
false => 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