Skip to content

Commit 41a010a

Browse files
committed
refactor: change to as_mut
1 parent 6cbf48f commit 41a010a

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/stream/stream/partition.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@ where
4444

4545
match next {
4646
Some(v) => {
47-
let mut res = this.res.take().unwrap();
48-
47+
let mut res = this.res.as_mut().unwrap();
4948
if (this.f)(&v) {
5049
res.0.extend(Some(v))
5150
} else {
5251
res.1.extend(Some(v))
5352
}
54-
55-
*this.res = Some(res);
5653
}
5754
None => return Poll::Ready(this.res.take().unwrap()),
5855
}

0 commit comments

Comments
 (0)