File tree Expand file tree Collapse file tree 6 files changed +10
-15
lines changed
notify-debouncer-full/src Expand file tree Collapse file tree 6 files changed +10
-15
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ jobs:
2828 uses : Swatinem/rust-cache@v2
2929
3030 - name : Check formatting
31- run : cargo fmt --all -- --check
31+ run : cargo +stable fmt --all -- --check
3232
3333 - name : Clippy
34- run : cargo clippy --all-targets --all-features -- -D warnings
34+ run : cargo +stable clippy --all-targets --all-features -- -D warnings
3535
3636 - name : Install typos-cli
3737 uses : taiki-e/install-action@v2
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ struct Queue {
163163
164164impl Queue {
165165 fn was_created ( & self ) -> bool {
166- self . events . front ( ) . map_or ( false , |event| {
166+ self . events . front ( ) . is_some_and ( |event| {
167167 matches ! (
168168 event. kind,
169169 EventKind :: Create ( _) | EventKind :: Modify ( ModifyKind :: Name ( RenameMode :: To ) )
@@ -172,7 +172,7 @@ impl Queue {
172172 }
173173
174174 fn was_removed ( & self ) -> bool {
175- self . events . front ( ) . map_or ( false , |event| {
175+ self . events . front ( ) . is_some_and ( |event| {
176176 matches ! (
177177 event. kind,
178178 EventKind :: Remove ( _) | EventKind :: Modify ( ModifyKind :: Name ( RenameMode :: From ) )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ mod tests {
1010 fn test_debug_impl ( ) {
1111 macro_rules! assert_debug_impl {
1212 ( $t: ty) => { {
13+ #[ allow( dead_code) ]
1314 trait NeedsDebug : std:: fmt:: Debug { }
1415 impl NeedsDebug for $t { }
1516 } } ;
Original file line number Diff line number Diff line change @@ -166,9 +166,6 @@ fn display_formatted_errors() {
166166
167167 assert_eq ! (
168168 expected,
169- format!(
170- "{}" ,
171- Error :: io( io:: Error :: new( io:: ErrorKind :: Other , expected) )
172- )
169+ format!( "{}" , Error :: io( io:: Error :: other( expected) ) )
173170 ) ;
174171}
Original file line number Diff line number Diff line change @@ -244,13 +244,9 @@ impl EventLoop {
244244 . add_some_path ( path. clone ( ) ) ,
245245 ) ;
246246
247- let trackers_match = self
248- . rename_event
249- . as_ref ( )
250- . and_then ( |e| e. tracker ( ) )
251- . map_or ( false , |from_tracker| {
252- from_tracker == event. cookie as usize
253- } ) ;
247+ let trackers_match =
248+ self . rename_event . as_ref ( ) . and_then ( |e| e. tracker ( ) )
249+ == Some ( event. cookie as usize ) ;
254250
255251 if trackers_match {
256252 let rename_event = self . rename_event . take ( ) . unwrap ( ) ; // unwrap is safe because `rename_event` must be set at this point
Original file line number Diff line number Diff line change @@ -409,6 +409,7 @@ mod tests {
409409 fn test_debug_impl ( ) {
410410 macro_rules! assert_debug_impl {
411411 ( $t: ty) => { {
412+ #[ allow( dead_code) ]
412413 trait NeedsDebug : std:: fmt:: Debug { }
413414 impl NeedsDebug for $t { }
414415 } } ;
You can’t perform that action at this time.
0 commit comments