@@ -12,7 +12,7 @@ use prelude::*;
1212use ptr:: null;
1313use libc:: c_void;
1414use rt:: uv:: { Request , NativeHandle , Loop , FsCallback , Buf ,
15- status_to_maybe_uv_error_with_loop , UvError } ;
15+ status_to_maybe_uv_error , UvError } ;
1616use rt:: uv:: uvll;
1717use rt:: uv:: uvll:: * ;
1818use super :: super :: io:: support:: PathLike ;
@@ -62,7 +62,7 @@ impl FsRequest {
6262 pub fn open_sync < P : PathLike > ( loop_ : & Loop , path : & P , flags : int , mode : int )
6363 -> Result < int , UvError > {
6464 let result = FsRequest :: open_common ( loop_, path, flags, mode, None ) ;
65- sync_cleanup ( loop_ , result)
65+ sync_cleanup ( result)
6666 }
6767
6868 fn unlink_common < P : PathLike > ( loop_ : & Loop , path : & P , cb : Option < FsCallback > ) -> int {
@@ -83,11 +83,11 @@ impl FsRequest {
8383 }
8484 pub fn unlink < P : PathLike > ( loop_ : & Loop , path : & P , cb : FsCallback ) {
8585 let result = FsRequest :: unlink_common ( loop_, path, Some ( cb) ) ;
86- sync_cleanup ( loop_ , result) ;
86+ sync_cleanup ( result) ;
8787 }
8888 pub fn unlink_sync < P : PathLike > ( loop_ : & Loop , path : & P ) -> Result < int , UvError > {
8989 let result = FsRequest :: unlink_common ( loop_, path, None ) ;
90- sync_cleanup ( loop_ , result)
90+ sync_cleanup ( result)
9191 }
9292
9393 pub fn install_req_data ( & self , cb : Option < FsCallback > ) {
@@ -140,9 +140,9 @@ impl NativeHandle<*uvll::uv_fs_t> for FsRequest {
140140 }
141141}
142142
143- fn sync_cleanup ( loop_ : & Loop , result : int )
143+ fn sync_cleanup ( result : int )
144144 -> Result < int , UvError > {
145- match status_to_maybe_uv_error_with_loop ( loop_ . native_handle ( ) , result as i32 ) {
145+ match status_to_maybe_uv_error ( result as i32 ) {
146146 Some ( err) => Err ( err) ,
147147 None => Ok ( result)
148148 }
@@ -186,7 +186,7 @@ impl FileDescriptor {
186186 pub fn write_sync ( & mut self , loop_ : & Loop , buf : Buf , offset : i64 )
187187 -> Result < int , UvError > {
188188 let result = self . write_common ( loop_, buf, offset, None ) ;
189- sync_cleanup ( loop_ , result)
189+ sync_cleanup ( result)
190190 }
191191
192192 fn read_common ( & mut self , loop_ : & Loop , buf : Buf ,
@@ -214,7 +214,7 @@ impl FileDescriptor {
214214 pub fn read_sync ( & mut self , loop_ : & Loop , buf : Buf , offset : i64 )
215215 -> Result < int , UvError > {
216216 let result = self . read_common ( loop_, buf, offset, None ) ;
217- sync_cleanup ( loop_ , result)
217+ sync_cleanup ( result)
218218 }
219219
220220 fn close_common ( self , loop_ : & Loop , cb : Option < FsCallback > ) -> int {
@@ -236,12 +236,11 @@ impl FileDescriptor {
236236 }
237237 pub fn close_sync ( self , loop_ : & Loop ) -> Result < int , UvError > {
238238 let result = self . close_common ( loop_, None ) ;
239- sync_cleanup ( loop_ , result)
239+ sync_cleanup ( result)
240240 }
241241}
242242extern fn compl_cb ( req : * uv_fs_t ) {
243243 let mut req: FsRequest = NativeHandle :: from_native_handle ( req) ;
244- let loop_ = req. get_loop ( ) ;
245244 // pull the user cb out of the req data
246245 let cb = {
247246 let data = req. get_req_data ( ) ;
@@ -252,8 +251,7 @@ extern fn compl_cb(req: *uv_fs_t) {
252251 // in uv_fs_open calls, the result will be the fd in the
253252 // case of success, otherwise it's -1 indicating an error
254253 let result = req. get_result ( ) ;
255- let status = status_to_maybe_uv_error_with_loop (
256- loop_. native_handle ( ) , result) ;
254+ let status = status_to_maybe_uv_error ( result) ;
257255 // we have a req and status, call the user cb..
258256 // only giving the user a ref to the FsRequest, as we
259257 // have to clean it up, afterwards (and they aren't really
0 commit comments