Skip to content

Commit 03e3d3a

Browse files
committed
Avoid the future try keyword
1 parent 50b128b commit 03e3d3a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/iter/plumbing/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ impl Splitter {
269269
}
270270

271271
#[inline]
272-
fn try(&mut self, stolen: bool) -> bool {
272+
fn try_split(&mut self, stolen: bool) -> bool {
273273
let Splitter { splits } = *self;
274274

275275
if stolen {
@@ -331,9 +331,9 @@ impl LengthSplitter {
331331
}
332332

333333
#[inline]
334-
fn try(&mut self, len: usize, stolen: bool) -> bool {
334+
fn try_split(&mut self, len: usize, stolen: bool) -> bool {
335335
// If splitting wouldn't make us too small, try the inner splitter.
336-
len / 2 >= self.min && self.inner.try(stolen)
336+
len / 2 >= self.min && self.inner.try_split(stolen)
337337
}
338338
}
339339

@@ -409,7 +409,7 @@ where
409409
{
410410
if consumer.full() {
411411
consumer.into_folder().complete()
412-
} else if splitter.try(len, migrated) {
412+
} else if splitter.try_split(len, migrated) {
413413
let mid = len / 2;
414414
let (left_producer, right_producer) = producer.split_at(mid);
415415
let (left_consumer, right_consumer, reducer) = consumer.split_at(mid);
@@ -464,7 +464,7 @@ where
464464
{
465465
if consumer.full() {
466466
consumer.into_folder().complete()
467-
} else if splitter.try(migrated) {
467+
} else if splitter.try_split(migrated) {
468468
match producer.split() {
469469
(left_producer, Some(right_producer)) => {
470470
let (reducer, left_consumer, right_consumer) =

0 commit comments

Comments
 (0)