Skip to content

Commit 00f2d2e

Browse files
committed
chore: update
1 parent 03552fc commit 00f2d2e

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

notify/src/fsevent.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ unsafe fn callback_impl(
535535
) {
536536
let event_paths = event_paths as *const *const libc::c_char;
537537
let info = info as *const StreamContextInfo;
538-
let event_handler = &(unsafe { *info }).event_handler;
538+
let event_handler = unsafe { &(*info).event_handler };
539539

540540
for p in 0..num_events {
541541
let path = unsafe { CStr::from_ptr(*event_paths.add(p)) }
@@ -549,16 +549,16 @@ unsafe fn callback_impl(
549549
});
550550

551551
let mut handle_event = false;
552-
for (p, r) in &(unsafe { *info }).recursive_info {
552+
for (p, r) in unsafe { &(*info).recursive_info } {
553553
if path.starts_with(p) {
554554
if *r || &path == p {
555555
handle_event = true;
556556
break;
557-
} else if let Some(parent_path) = path.parent() {
558-
if parent_path == p {
559-
handle_event = true;
560-
break;
561-
}
557+
} else if let Some(parent_path) = path.parent()
558+
&& parent_path == p
559+
{
560+
handle_event = true;
561+
break;
562562
}
563563
}
564564
}

0 commit comments

Comments
 (0)