@@ -131,7 +131,7 @@ impl Inotify {
131
131
/// Returns a watch descriptor. This is not a File Descriptor!
132
132
///
133
133
/// For more information see, [inotify_add_watch(2)](http://man7.org/linux/man-pages/man2/inotify_add_watch.2.html).
134
- pub fn add_watch < P : ?Sized + NixPath > ( & self ,
134
+ pub fn add_watch < P : ?Sized + NixPath > ( self ,
135
135
path : & P ,
136
136
mask : AddWatchFlags )
137
137
-> Result < WatchDescriptor >
@@ -152,14 +152,14 @@ impl Inotify {
152
152
///
153
153
/// For more information see, [inotify_rm_watch(2)](http://man7.org/linux/man-pages/man2/inotify_rm_watch.2.html).
154
154
#[ cfg( target_os = "linux" ) ]
155
- pub fn rm_watch ( & self , wd : WatchDescriptor ) -> Result < ( ) > {
155
+ pub fn rm_watch ( self , wd : WatchDescriptor ) -> Result < ( ) > {
156
156
let res = unsafe { libc:: inotify_rm_watch ( self . fd , wd. wd ) } ;
157
157
158
158
Errno :: result ( res) . map ( drop)
159
159
}
160
160
161
161
#[ cfg( target_os = "android" ) ]
162
- pub fn rm_watch ( & self , wd : WatchDescriptor ) -> Result < ( ) > {
162
+ pub fn rm_watch ( self , wd : WatchDescriptor ) -> Result < ( ) > {
163
163
let res = unsafe { libc:: inotify_rm_watch ( self . fd , wd. wd as u32 ) } ;
164
164
165
165
Errno :: result ( res) . map ( drop)
@@ -171,7 +171,7 @@ impl Inotify {
171
171
///
172
172
/// Returns as many events as available. If the call was non blocking and no
173
173
/// events could be read then the EAGAIN error is returned.
174
- pub fn read_events ( & self ) -> Result < Vec < InotifyEvent > > {
174
+ pub fn read_events ( self ) -> Result < Vec < InotifyEvent > > {
175
175
let header_size = size_of :: < libc:: inotify_event > ( ) ;
176
176
const BUFSIZ : usize = 4096 ;
177
177
let mut buffer = [ 0u8 ; BUFSIZ ] ;
0 commit comments