@@ -9,12 +9,12 @@ use std::sync::atomic::{AtomicUsize, Ordering};
99use std:: sync:: mpsc:: { channel, Receiver , Sender } ;
1010use std:: sync:: Arc ;
1111
12- use super :: { perform, CompletedIO , Executor , Item } ;
12+ use super :: { perform, CompletedIo , Executor , Item } ;
1313use crate :: utils:: notifications:: Notification ;
1414use crate :: utils:: units:: Unit ;
1515
1616enum Task {
17- Request ( CompletedIO ) ,
17+ Request ( CompletedIo ) ,
1818 // Used to synchronise in the join method.
1919 Sentinel ,
2020}
@@ -60,19 +60,19 @@ impl<'a> Threaded<'a> {
6060 let n_files = self . n_files . clone ( ) ;
6161 self . pool . execute ( move || {
6262 let chunk_complete_callback = |size| {
63- tx. send ( Task :: Request ( CompletedIO :: Chunk ( size) ) )
63+ tx. send ( Task :: Request ( CompletedIo :: Chunk ( size) ) )
6464 . expect ( "receiver should be listening" )
6565 } ;
6666 perform ( & mut item, chunk_complete_callback) ;
6767 n_files. fetch_sub ( 1 , Ordering :: Relaxed ) ;
68- tx. send ( Task :: Request ( CompletedIO :: Item ( item) ) )
68+ tx. send ( Task :: Request ( CompletedIo :: Item ( item) ) )
6969 . expect ( "receiver should be listening" ) ;
7070 } ) ;
7171 }
7272}
7373
7474impl < ' a > Executor for Threaded < ' a > {
75- fn dispatch ( & self , item : Item ) -> Box < dyn Iterator < Item = CompletedIO > + ' _ > {
75+ fn dispatch ( & self , item : Item ) -> Box < dyn Iterator < Item = CompletedIo > + ' _ > {
7676 // Yield any completed work before accepting new work - keep memory
7777 // pressure under control
7878 // - return an iterator that runs until we can submit and then submits
@@ -83,7 +83,7 @@ impl<'a> Executor for Threaded<'a> {
8383 } )
8484 }
8585
86- fn join ( & mut self ) -> Box < dyn Iterator < Item = CompletedIO > + ' _ > {
86+ fn join ( & mut self ) -> Box < dyn Iterator < Item = CompletedIo > + ' _ > {
8787 // Some explanation is in order. Even though the tar we are reading from (if
8888 // any) will have had its FileWithProgress download tracking
8989 // completed before we hit drop, that is not true if we are unwinding due to a
@@ -149,7 +149,7 @@ impl<'a> Executor for Threaded<'a> {
149149 } )
150150 }
151151
152- fn completed ( & self ) -> Box < dyn Iterator < Item = CompletedIO > + ' _ > {
152+ fn completed ( & self ) -> Box < dyn Iterator < Item = CompletedIo > + ' _ > {
153153 Box :: new ( JoinIterator {
154154 iter : self . rx . try_iter ( ) ,
155155 consume_sentinel : true ,
@@ -174,9 +174,9 @@ struct JoinIterator<T: Iterator<Item = Task>> {
174174}
175175
176176impl < T : Iterator < Item = Task > > Iterator for JoinIterator < T > {
177- type Item = CompletedIO ;
177+ type Item = CompletedIo ;
178178
179- fn next ( & mut self ) -> Option < CompletedIO > {
179+ fn next ( & mut self ) -> Option < CompletedIo > {
180180 let task_o = self . iter . next ( ) ;
181181 match task_o {
182182 None => None ,
@@ -200,9 +200,9 @@ struct SubmitIterator<'a, 'b> {
200200}
201201
202202impl < ' a , ' b > Iterator for SubmitIterator < ' a , ' b > {
203- type Item = CompletedIO ;
203+ type Item = CompletedIo ;
204204
205- fn next ( & mut self ) -> Option < CompletedIO > {
205+ fn next ( & mut self ) -> Option < CompletedIo > {
206206 // The number here is arbitrary; just a number to stop exhausting fd's on linux
207207 // and still allow rapid decompression to generate work to dispatch
208208 // This function could perhaps be tuned: e.g. it may wait in rx.iter()
0 commit comments