@@ -683,6 +683,16 @@ impl std::fmt::Debug for dirent {
683
683
. finish ( )
684
684
}
685
685
}
686
+ #[ cfg( feature = "extra_traits" ) ]
687
+ impl std:: hash:: Hash for dirent {
688
+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
689
+ self . d_ino . hash ( state) ;
690
+ self . d_off . hash ( state) ;
691
+ self . d_reclen . hash ( state) ;
692
+ self . d_type . hash ( state) ;
693
+ self . d_name . hash ( state) ;
694
+ }
695
+ }
686
696
687
697
#[ cfg( feature = "extra_traits" ) ]
688
698
impl PartialEq for dirent64 {
@@ -708,6 +718,16 @@ impl std::fmt::Debug for dirent64 {
708
718
. finish ( )
709
719
}
710
720
}
721
+ #[ cfg( feature = "extra_traits" ) ]
722
+ impl std:: hash:: Hash for dirent64 {
723
+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
724
+ self . d_ino . hash ( state) ;
725
+ self . d_off . hash ( state) ;
726
+ self . d_reclen . hash ( state) ;
727
+ self . d_type . hash ( state) ;
728
+ self . d_name . hash ( state) ;
729
+ }
730
+ }
711
731
712
732
#[ cfg( feature = "extra_traits" ) ]
713
733
impl PartialEq for pthread_cond_t {
@@ -725,6 +745,12 @@ impl std::fmt::Debug for pthread_cond_t {
725
745
. finish ( )
726
746
}
727
747
}
748
+ #[ cfg( feature = "extra_traits" ) ]
749
+ impl std:: hash:: Hash for pthread_cond_t {
750
+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
751
+ self . size . hash ( state) ;
752
+ }
753
+ }
728
754
729
755
#[ cfg( feature = "extra_traits" ) ]
730
756
impl PartialEq for pthread_mutex_t {
@@ -742,6 +768,12 @@ impl std::fmt::Debug for pthread_mutex_t {
742
768
. finish ( )
743
769
}
744
770
}
771
+ #[ cfg( feature = "extra_traits" ) ]
772
+ impl std:: hash:: Hash for pthread_mutex_t {
773
+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
774
+ self . size . hash ( state) ;
775
+ }
776
+ }
745
777
746
778
#[ cfg( feature = "extra_traits" ) ]
747
779
impl PartialEq for pthread_rwlock_t {
@@ -759,6 +791,12 @@ impl std::fmt::Debug for pthread_rwlock_t {
759
791
. finish ( )
760
792
}
761
793
}
794
+ #[ cfg( feature = "extra_traits" ) ]
795
+ impl std:: hash:: Hash for pthread_rwlock_t {
796
+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
797
+ self . size . hash ( state) ;
798
+ }
799
+ }
762
800
763
801
pub const ABDAY_1 : :: nl_item = 0x20000 ;
764
802
pub const ABDAY_2 : :: nl_item = 0x20001 ;
0 commit comments