File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,7 @@ pub enum FileAccess {
13201320}
13211321
13221322/// Different kinds of files which can be identified by a call to stat
1323- #[ deriving( Eq , Show ) ]
1323+ #[ deriving( Eq , Show , Hash ) ]
13241324pub enum FileType {
13251325 /// This is a normal file, corresponding to `S_IFREG`
13261326 TypeFile ,
@@ -1358,6 +1358,7 @@ pub enum FileType {
13581358/// println!("byte size: {}", info.size);
13591359/// # }
13601360/// ```
1361+ #[ deriving( Hash ) ]
13611362pub struct FileStat {
13621363 /// The path that this stat structure is describing
13631364 path : Path ,
@@ -1399,6 +1400,7 @@ pub struct FileStat {
13991400/// have different meanings or no meaning at all on some platforms.
14001401#[ unstable]
14011402#[ allow( missing_doc) ]
1403+ #[ deriving( Hash ) ]
14021404pub struct UnstableFileStat {
14031405 device : u64 ,
14041406 inode : u64 ,
Original file line number Diff line number Diff line change @@ -88,10 +88,10 @@ impl ToCStr for Path {
8888 }
8989}
9090
91- impl < H : Writer > :: hash:: Hash < H > for Path {
91+ impl < S : Writer > :: hash:: Hash < S > for Path {
9292 #[ inline]
93- fn hash ( & self , hasher : & mut H ) {
94- self . repr . hash ( hasher )
93+ fn hash ( & self , state : & mut S ) {
94+ self . repr . hash ( state )
9595 }
9696}
9797
Original file line number Diff line number Diff line change @@ -112,10 +112,10 @@ impl ToCStr for Path {
112112 }
113113}
114114
115- impl < H : Writer > :: hash:: Hash < H > for Path {
115+ impl < S : Writer > :: hash:: Hash < S > for Path {
116116 #[ inline]
117- fn hash ( & self , hasher : & mut H ) {
118- self . repr . hash ( hasher )
117+ fn hash ( & self , state : & mut S ) {
118+ self . repr . hash ( state )
119119 }
120120}
121121
You can’t perform that action at this time.
0 commit comments