Skip to content

Commit 11ec3c4

Browse files
Fix clippy lints
1 parent 19b2917 commit 11ec3c4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/crates/lists.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub(crate) fn get_crates(
8888
all_crates.append(&mut GitHubList::get(db)?);
8989
all_crates.append(&mut LocalList::get(db)?);
9090

91-
for krate in all_crates.drain(..) {
91+
for krate in all_crates {
9292
let add = match krate {
9393
Crate::Registry(RegistryCrate { ref name, .. }) => demo_registry.remove(name),
9494
Crate::GitHub(ref repo) => demo_github.remove(&repo.slug()),

src/runner/graph.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,11 +155,11 @@ impl TasksGraph {
155155

156156
// Try to check for the dependencies of this node
157157
// The list is collected to make the borrowchecker happy
158-
let mut neighbors = self.graph.neighbors(node).collect::<Vec<_>>();
158+
let neighbors = self.graph.neighbors(node).collect::<Vec<_>>();
159159
log::trace!("{} | {:?}: neighbors: {:?}", worker, node, neighbors);
160160

161161
let mut blocked = false;
162-
for neighbor in neighbors.drain(..) {
162+
for neighbor in neighbors {
163163
match self.walk_graph(neighbor, ex, db, worker) {
164164
WalkResult::Task(id, task) => return WalkResult::Task(id, task),
165165
WalkResult::Finished => return WalkResult::Finished,
@@ -219,12 +219,12 @@ impl TasksGraph {
219219
result: &TestResult,
220220
worker: &str,
221221
) -> Fallible<()> {
222-
let mut children = self
222+
let children = self
223223
.graph
224224
.neighbors_directed(node, Direction::Incoming)
225225
.collect::<Vec<_>>();
226226
let mut last_err = None;
227-
for child in children.drain(..) {
227+
for child in children {
228228
// Don't recursively mark a child as failed if this is not the only parent of the child
229229
let parents = self
230230
.graph

src/runner/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pub fn run_ex<DB: WriteResults + Sync>(
157157
Ok(())
158158
})?;
159159

160-
let clean_exit = join_threads(threads.drain(..));
160+
let clean_exit = join_threads(threads.into_iter());
161161
disk_watcher.stop();
162162
let disk_watcher_clean_exit = join_threads(std::iter::once(disk_watcher_thread));
163163

0 commit comments

Comments
 (0)