Skip to content

Commit 1de0c30

Browse files
mendelsshopphimuemue
authored andcommitted
Unqualify borrow() in combinations_with_replacement
1 parent d4ecad7 commit 1de0c30

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/combinations_with_replacement.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use alloc::boxed::Box;
2-
use core::array;
32
use std::fmt;
43
use std::iter::FusedIterator;
54

@@ -113,9 +112,7 @@ where
113112
fn next(&mut self) -> Option<Self::Item> {
114113
if self.first {
115114
// In empty edge cases, stop iterating immediately
116-
if !(core::borrow::Borrow::<[usize]>::borrow(&self.indices).is_empty()
117-
|| self.pool.get_next())
118-
{
115+
if !((&self.indices).borrow().is_empty() || self.pool.get_next()) {
119116
return None;
120117
}
121118
self.first = false;
@@ -128,9 +125,7 @@ where
128125
fn nth(&mut self, n: usize) -> Option<Self::Item> {
129126
if self.first {
130127
// In empty edge cases, stop iterating immediately
131-
if !(core::borrow::Borrow::<[usize]>::borrow(&self.indices).is_empty()
132-
|| self.pool.get_next())
133-
{
128+
if !((&self.indices).borrow().is_empty() || self.pool.get_next()) {
134129
return None;
135130
}
136131
self.first = false;

0 commit comments

Comments
 (0)