File tree 3 files changed +9
-7
lines changed 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -1320,7 +1320,7 @@ pub enum FileAccess {
1320
1320
}
1321
1321
1322
1322
/// Different kinds of files which can be identified by a call to stat
1323
- #[ deriving( Eq , Show ) ]
1323
+ #[ deriving( Eq , Show , Hash ) ]
1324
1324
pub enum FileType {
1325
1325
/// This is a normal file, corresponding to `S_IFREG`
1326
1326
TypeFile ,
@@ -1358,6 +1358,7 @@ pub enum FileType {
1358
1358
/// println!("byte size: {}", info.size);
1359
1359
/// # }
1360
1360
/// ```
1361
+ #[ deriving( Hash ) ]
1361
1362
pub struct FileStat {
1362
1363
/// The path that this stat structure is describing
1363
1364
path : Path ,
@@ -1399,6 +1400,7 @@ pub struct FileStat {
1399
1400
/// have different meanings or no meaning at all on some platforms.
1400
1401
#[ unstable]
1401
1402
#[ allow( missing_doc) ]
1403
+ #[ deriving( Hash ) ]
1402
1404
pub struct UnstableFileStat {
1403
1405
device : u64 ,
1404
1406
inode : u64 ,
Original file line number Diff line number Diff line change @@ -88,10 +88,10 @@ impl ToCStr for Path {
88
88
}
89
89
}
90
90
91
- impl < H : Writer > :: hash:: Hash < H > for Path {
91
+ impl < S : Writer > :: hash:: Hash < S > for Path {
92
92
#[ 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 )
95
95
}
96
96
}
97
97
Original file line number Diff line number Diff line change @@ -112,10 +112,10 @@ impl ToCStr for Path {
112
112
}
113
113
}
114
114
115
- impl < H : Writer > :: hash:: Hash < H > for Path {
115
+ impl < S : Writer > :: hash:: Hash < S > for Path {
116
116
#[ 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 )
119
119
}
120
120
}
121
121
You can’t perform that action at this time.
0 commit comments