File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -88,7 +88,7 @@ pub(crate) fn get_crates(
88
88
all_crates. append ( & mut GitHubList :: get ( db) ?) ;
89
89
all_crates. append ( & mut LocalList :: get ( db) ?) ;
90
90
91
- for krate in all_crates. drain ( .. ) {
91
+ for krate in all_crates {
92
92
let add = match krate {
93
93
Crate :: Registry ( RegistryCrate { ref name, .. } ) => demo_registry. remove ( name) ,
94
94
Crate :: GitHub ( ref repo) => demo_github. remove ( & repo. slug ( ) ) ,
Original file line number Diff line number Diff line change @@ -155,11 +155,11 @@ impl TasksGraph {
155
155
156
156
// Try to check for the dependencies of this node
157
157
// 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 < _ > > ( ) ;
159
159
log:: trace!( "{} | {:?}: neighbors: {:?}" , worker, node, neighbors) ;
160
160
161
161
let mut blocked = false ;
162
- for neighbor in neighbors. drain ( .. ) {
162
+ for neighbor in neighbors {
163
163
match self . walk_graph ( neighbor, ex, db, worker) {
164
164
WalkResult :: Task ( id, task) => return WalkResult :: Task ( id, task) ,
165
165
WalkResult :: Finished => return WalkResult :: Finished ,
@@ -219,12 +219,12 @@ impl TasksGraph {
219
219
result : & TestResult ,
220
220
worker : & str ,
221
221
) -> Fallible < ( ) > {
222
- let mut children = self
222
+ let children = self
223
223
. graph
224
224
. neighbors_directed ( node, Direction :: Incoming )
225
225
. collect :: < Vec < _ > > ( ) ;
226
226
let mut last_err = None ;
227
- for child in children. drain ( .. ) {
227
+ for child in children {
228
228
// Don't recursively mark a child as failed if this is not the only parent of the child
229
229
let parents = self
230
230
. graph
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ pub fn run_ex<DB: WriteResults + Sync>(
157
157
Ok ( ( ) )
158
158
} ) ?;
159
159
160
- let clean_exit = join_threads ( threads. drain ( .. ) ) ;
160
+ let clean_exit = join_threads ( threads. into_iter ( ) ) ;
161
161
disk_watcher. stop ( ) ;
162
162
let disk_watcher_clean_exit = join_threads ( std:: iter:: once ( disk_watcher_thread) ) ;
163
163
You can’t perform that action at this time.
0 commit comments