@@ -2541,6 +2541,52 @@ cfg_if! {
2541
2541
. finish( )
2542
2542
}
2543
2543
}
2544
+
2545
+ impl PartialEq for kinfo_file {
2546
+ fn eq( & self , other: & kinfo_file) -> bool {
2547
+ self . kf_structsize == other. kf_structsize &&
2548
+ self . kf_type == other. kf_type &&
2549
+ self . kf_fd == other. kf_fd &&
2550
+ self . kf_ref_count == other. kf_ref_count &&
2551
+ self . kf_flags == other. kf_flags &&
2552
+ self . kf_offset == other. kf_offset &&
2553
+ self . kf_status == other. kf_status &&
2554
+ self . kf_cap_rights == other. kf_cap_rights &&
2555
+ self . kf_path
2556
+ . iter( )
2557
+ . zip( other. kf_path. iter( ) )
2558
+ . all( |( a, b) | a == b)
2559
+ }
2560
+ }
2561
+ impl Eq for kinfo_file { }
2562
+ impl :: fmt:: Debug for kinfo_file {
2563
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
2564
+ f. debug_struct( "kinfo_file" )
2565
+ . field( "kf_structsize" , & self . kf_structsize)
2566
+ . field( "kf_type" , & self . kf_type)
2567
+ . field( "kf_fd" , & self . kf_fd)
2568
+ . field( "kf_ref_count" , & self . kf_ref_count)
2569
+ . field( "kf_flags" , & self . kf_flags)
2570
+ . field( "kf_offset" , & self . kf_offset)
2571
+ . field( "kf_status" , & self . kf_status)
2572
+ . field( "kf_cap_rights" , & self . kf_cap_rights)
2573
+ . field( "kf_path" , &&self . kf_path[ ..] )
2574
+ . finish( )
2575
+ }
2576
+ }
2577
+ impl :: hash:: Hash for kinfo_file {
2578
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
2579
+ self . kf_structsize. hash( state) ;
2580
+ self . kf_type. hash( state) ;
2581
+ self . kf_fd. hash( state) ;
2582
+ self . kf_ref_count. hash( state) ;
2583
+ self . kf_flags. hash( state) ;
2584
+ self . kf_offset. hash( state) ;
2585
+ self . kf_status. hash( state) ;
2586
+ self . kf_cap_rights. hash( state) ;
2587
+ self . kf_path. hash( state) ;
2588
+ }
2589
+ }
2544
2590
}
2545
2591
}
2546
2592
0 commit comments