@@ -297,27 +297,11 @@ s! {
297
297
pub effect_id: :: __u32,
298
298
}
299
299
300
- pub struct uinput_setup {
301
- pub id: input_id,
302
- pub name: [ :: c_char; UINPUT_MAX_NAME_SIZE ] ,
303
- pub ff_effects_max: :: __u32,
304
- }
305
-
306
300
pub struct uinput_abs_setup {
307
301
pub code: :: __u16,
308
302
pub absinfo: input_absinfo,
309
303
}
310
304
311
- pub struct uinput_user_dev {
312
- pub name: [ :: c_char; UINPUT_MAX_NAME_SIZE ] ,
313
- pub id: input_id,
314
- pub ff_effects_max: :: __u32,
315
- pub absmax: [ :: __s32; ABS_CNT ] ,
316
- pub absmin: [ :: __s32; ABS_CNT ] ,
317
- pub absfuzz: [ :: __s32; ABS_CNT ] ,
318
- pub absflat: [ :: __s32; ABS_CNT ] ,
319
- }
320
-
321
305
pub struct dl_phdr_info {
322
306
#[ cfg( target_pointer_width = "64" ) ]
323
307
pub dlpi_addr: Elf64_Addr ,
@@ -591,6 +575,22 @@ s_no_extra_traits! {
591
575
pub salg_name: [ :: c_uchar; 64 ] ,
592
576
}
593
577
578
+ pub struct uinput_setup {
579
+ pub id: input_id,
580
+ pub name: [ :: c_char; UINPUT_MAX_NAME_SIZE ] ,
581
+ pub ff_effects_max: :: __u32,
582
+ }
583
+
584
+ pub struct uinput_user_dev {
585
+ pub name: [ :: c_char; UINPUT_MAX_NAME_SIZE ] ,
586
+ pub id: input_id,
587
+ pub ff_effects_max: :: __u32,
588
+ pub absmax: [ :: __s32; ABS_CNT ] ,
589
+ pub absmin: [ :: __s32; ABS_CNT ] ,
590
+ pub absfuzz: [ :: __s32; ABS_CNT ] ,
591
+ pub absflat: [ :: __s32; ABS_CNT ] ,
592
+ }
593
+
594
594
/// WARNING: The `PartialEq`, `Eq` and `Hash` implementations of this
595
595
/// type are unsound and will be removed in the future.
596
596
#[ deprecated(
@@ -861,6 +861,72 @@ cfg_if! {
861
861
}
862
862
}
863
863
864
+ impl PartialEq for uinput_setup {
865
+ fn eq( & self , other: & uinput_setup) -> bool {
866
+ self . id == other. id
867
+ && self . name[ ..] == other. name[ ..]
868
+ && self . ff_effects_max == other. ff_effects_max
869
+ }
870
+ }
871
+ impl Eq for uinput_setup { }
872
+
873
+ impl :: fmt:: Debug for uinput_setup {
874
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
875
+ f. debug_struct( "uinput_setup" )
876
+ . field( "id" , & self . id)
877
+ . field( "name" , &&self . name[ ..] )
878
+ . field( "ff_effects_max" , & self . ff_effects_max)
879
+ . finish( )
880
+ }
881
+ }
882
+
883
+ impl :: hash:: Hash for uinput_setup {
884
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
885
+ self . id. hash( state) ;
886
+ self . name. hash( state) ;
887
+ self . ff_effects_max. hash( state) ;
888
+ }
889
+ }
890
+
891
+ impl PartialEq for uinput_user_dev {
892
+ fn eq( & self , other: & uinput_user_dev) -> bool {
893
+ self . name[ ..] == other. name[ ..]
894
+ && self . id == other. id
895
+ && self . ff_effects_max == other. ff_effects_max
896
+ && self . absmax[ ..] == other. absmax[ ..]
897
+ && self . absmin[ ..] == other. absmin[ ..]
898
+ && self . absfuzz[ ..] == other. absfuzz[ ..]
899
+ && self . absflat[ ..] == other. absflat[ ..]
900
+ }
901
+ }
902
+ impl Eq for uinput_user_dev { }
903
+
904
+ impl :: fmt:: Debug for uinput_user_dev {
905
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
906
+ f. debug_struct( "uinput_setup" )
907
+ . field( "name" , &&self . name[ ..] )
908
+ . field( "id" , & self . id)
909
+ . field( "ff_effects_max" , & self . ff_effects_max)
910
+ . field( "absmax" , &&self . absmax[ ..] )
911
+ . field( "absmin" , &&self . absmin[ ..] )
912
+ . field( "absfuzz" , &&self . absfuzz[ ..] )
913
+ . field( "absflat" , &&self . absflat[ ..] )
914
+ . finish( )
915
+ }
916
+ }
917
+
918
+ impl :: hash:: Hash for uinput_user_dev {
919
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
920
+ self . name. hash( state) ;
921
+ self . id. hash( state) ;
922
+ self . ff_effects_max. hash( state) ;
923
+ self . absmax. hash( state) ;
924
+ self . absmin. hash( state) ;
925
+ self . absfuzz. hash( state) ;
926
+ self . absflat. hash( state) ;
927
+ }
928
+ }
929
+
864
930
#[ allow( deprecated) ]
865
931
impl af_alg_iv {
866
932
fn as_slice( & self ) -> & [ u8 ] {
0 commit comments