Skip to content

Commit d6bf454

Browse files
committed
Clippy fix.
1 parent d223b2f commit d6bf454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

engine/src/conversion/analysis/depth_first.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl<'a, T: HasFieldsAndBases + Debug> Iterator for DepthFirstIter<'a, T> {
4444
type Item = &'a T;
4545

4646
fn next(&mut self) -> Option<Self::Item> {
47-
let first_candidate = self.queue.get(0).map(|api| api.name());
47+
let first_candidate = self.queue.front().map(|api| api.name());
4848
while let Some(candidate) = self.queue.pop_front() {
4949
if !candidate
5050
.field_and_base_deps()
@@ -54,7 +54,7 @@ impl<'a, T: HasFieldsAndBases + Debug> Iterator for DepthFirstIter<'a, T> {
5454
return Some(candidate);
5555
}
5656
self.queue.push_back(candidate);
57-
if self.queue.get(0).map(|api| api.name()) == first_candidate {
57+
if self.queue.front().map(|api| api.name()) == first_candidate {
5858
panic!(
5959
"Failed to find a candidate; there must be a circular dependency. Queue is {}",
6060
self.queue

0 commit comments

Comments
 (0)