Skip to content

Commit a69b3a8

Browse files
committed
use as_mut for stream-partition
1 parent 693a725 commit a69b3a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/stream/stream/partition.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,11 @@ where
4545

4646
match next {
4747
Some(v) => {
48-
let mut res = this.res.take().unwrap();
48+
let res = this.res.as_mut().unwrap();
4949
match (this.f)(&v) {
5050
true => res.0.extend(Some(v)),
5151
false => res.1.extend(Some(v)),
5252
};
53-
54-
*this.res = Some(res);
5553
}
5654
None => return Poll::Ready(this.res.take().unwrap()),
5755
}

0 commit comments

Comments
 (0)