@@ -230,7 +230,6 @@ s_no_extra_traits!{
230
230
not( target_os = "android" ) ) ,
231
231
target_arch = "x86_64" ) ,
232
232
repr( packed) ) ]
233
- #[ allow( missing_debug_implementations) ]
234
233
pub struct epoll_event {
235
234
pub events: :: uint32_t,
236
235
pub u64 : :: uint64_t,
@@ -262,6 +261,32 @@ s_no_extra_traits!{
262
261
263
262
cfg_if ! {
264
263
if #[ cfg( feature = "extra_traits" ) ] {
264
+ impl PartialEq for epoll_event {
265
+ fn eq( & self , other: & epoll_event) -> bool {
266
+ self . events == other. events
267
+ && self . u64 == other. u64
268
+ }
269
+ }
270
+ impl Eq for epoll_event { }
271
+ impl :: fmt:: Debug for epoll_event {
272
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
273
+ let events = self . events;
274
+ let u64 = self . u64 ;
275
+ f. debug_struct( "epoll_event" )
276
+ . field( "events" , & events)
277
+ . field( "u64" , & u64 )
278
+ . finish( )
279
+ }
280
+ }
281
+ impl :: hash:: Hash for epoll_event {
282
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
283
+ let events = self . events;
284
+ let u64 = self . u64 ;
285
+ events. hash( state) ;
286
+ u64 . hash( state) ;
287
+ }
288
+ }
289
+
265
290
impl PartialEq for sockaddr_un {
266
291
fn eq( & self , other: & sockaddr_un) -> bool {
267
292
self . sun_family == other. sun_family
@@ -272,9 +297,7 @@ cfg_if! {
272
297
. all( |( a, b) | a == b)
273
298
}
274
299
}
275
-
276
300
impl Eq for sockaddr_un { }
277
-
278
301
impl :: fmt:: Debug for sockaddr_un {
279
302
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
280
303
f. debug_struct( "sockaddr_un" )
@@ -283,7 +306,6 @@ cfg_if! {
283
306
. finish( )
284
307
}
285
308
}
286
-
287
309
impl :: hash:: Hash for sockaddr_un {
288
310
fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
289
311
self . sun_family. hash( state) ;
0 commit comments