@@ -271,18 +271,15 @@ pub const MAX_HANDLE_SZ: usize = 128;
271
271
272
272
/// Abstract over [`libc::fanotify_event_info_fid`], which represents an
273
273
/// information record received via [`Fanotify::read_events_with_info_records`].
274
- #[ derive( Debug , Eq , Hash , PartialEq ) ]
274
+ #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
275
275
#[ repr( transparent) ]
276
- #[ allow( missing_copy_implementations) ]
277
276
pub struct LibcFanotifyFidRecord ( libc:: fanotify_event_info_fid ) ;
278
277
279
278
/// Extends LibcFanotifyFidRecord to include file_handle bytes.
280
279
/// This allows Rust to move the record around in memory and not lose the file_handle
281
280
/// as the libc::fanotify_event_info_fid does not include any of the file_handle bytes.
282
- // Is not Clone due to fd field, to avoid use-after-close scenarios.
283
- #[ derive( Debug , Eq , Hash , PartialEq ) ]
281
+ #[ derive( Clone , Debug , Eq , Hash , PartialEq ) ]
284
282
#[ repr( C ) ]
285
- #[ allow( missing_copy_implementations) ]
286
283
pub struct FanotifyFidRecord {
287
284
record : LibcFanotifyFidRecord ,
288
285
file_handle_bytes : [ u8 ; MAX_HANDLE_SZ ] ,
@@ -326,10 +323,8 @@ impl FanotifyFidRecord {
326
323
327
324
/// Abstract over [`libc::fanotify_event_info_error`], which represents an
328
325
/// information record received via [`Fanotify::read_events_with_info_records`].
329
- // Is not Clone due to fd field, to avoid use-after-close scenarios.
330
- #[ derive( Debug , Eq , Hash , PartialEq ) ]
326
+ #[ derive( Clone , Copy , Debug , Eq , Hash , PartialEq ) ]
331
327
#[ repr( transparent) ]
332
- #[ allow( missing_copy_implementations) ]
333
328
#[ cfg( target_env = "gnu" ) ]
334
329
pub struct FanotifyErrorRecord ( libc:: fanotify_event_info_error ) ;
335
330
@@ -350,7 +345,7 @@ impl FanotifyErrorRecord {
350
345
351
346
/// Abstract over [`libc::fanotify_event_info_pidfd`], which represents an
352
347
/// information record received via [`Fanotify::read_events_with_info_records`].
353
- // Is not Clone due to fd field, to avoid use-after-close scenarios.
348
+ // Is not Clone due to pidfd field, to avoid use-after-close scenarios.
354
349
#[ derive( Debug , Eq , Hash , PartialEq ) ]
355
350
#[ repr( transparent) ]
356
351
#[ allow( missing_copy_implementations) ]
0 commit comments