@@ -941,7 +941,9 @@ s_no_extra_traits! {
941
941
pub sched_deadline: :: __u64,
942
942
pub sched_period: :: __u64,
943
943
}
944
+ }
944
945
946
+ s ! {
945
947
// linux/ptp_clock.h
946
948
pub struct ptp_sys_offset {
947
949
pub n_samples: :: c_uint,
@@ -1489,62 +1491,6 @@ cfg_if! {
1489
1491
self . sched_period. hash( state) ;
1490
1492
}
1491
1493
}
1492
-
1493
- impl PartialEq for ptp_sys_offset {
1494
- fn eq( & self , other: & ptp_sys_offset) -> bool {
1495
- self . n_samples == other. n_samples &&
1496
- self . rsv == other. rsv &&
1497
- self . ts[ ..] == other. ts[ ..]
1498
- }
1499
- }
1500
- impl Eq for ptp_sys_offset { }
1501
- impl :: fmt:: Debug for ptp_sys_offset {
1502
- fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1503
- f. debug_struct( "ptp_sys_offset" )
1504
- . field( "n_samples" , & self . n_samples)
1505
- . field( "rsv" , & self . rsv)
1506
- . field( "ts" , &&self . ts[ ..] )
1507
- . finish( )
1508
- }
1509
- }
1510
- impl :: hash:: Hash for ptp_sys_offset {
1511
- fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
1512
- self . n_samples. hash( state) ;
1513
- self . rsv. hash( state) ;
1514
- self . ts[ ..] . hash( state) ;
1515
- }
1516
- }
1517
-
1518
- impl PartialEq for ptp_pin_desc {
1519
- fn eq( & self , other: & ptp_pin_desc) -> bool {
1520
- self . name[ ..] == other. name[ ..] &&
1521
- self . index == other. index &&
1522
- self . func == other. func &&
1523
- self . chan == other. chan &&
1524
- self . rsv == other. rsv
1525
- }
1526
- }
1527
- impl Eq for ptp_pin_desc { }
1528
- impl :: fmt:: Debug for ptp_pin_desc {
1529
- fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1530
- f. debug_struct( "ptp_pin_desc" )
1531
- . field( "name" , &&self . name[ ..] )
1532
- . field( "index" , & self . index)
1533
- . field( "func" , & self . func)
1534
- . field( "chan" , & self . chan)
1535
- . field( "rsv" , & self . rsv)
1536
- . finish( )
1537
- }
1538
- }
1539
- impl :: hash:: Hash for ptp_pin_desc {
1540
- fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
1541
- self . name[ ..] . hash( state) ;
1542
- self . index. hash( state) ;
1543
- self . func. hash( state) ;
1544
- self . chan. hash( state) ;
1545
- self . rsv. hash( state) ;
1546
- }
1547
- }
1548
1494
}
1549
1495
}
1550
1496
0 commit comments