File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2264,6 +2264,12 @@ mod tests {
2264
2264
assert_eq ! ( check!( fs:: metadata( & tmpdir. join( "h" ) ) ) . len( ) , 9 ) ;
2265
2265
}
2266
2266
2267
+ #[ test]
2268
+ fn _assert_send_sync ( ) {
2269
+ fn _assert_send_sync < T : Send + Sync > ( ) { }
2270
+ _assert_send_sync :: < OpenOptions > ( ) ;
2271
+ }
2272
+
2267
2273
#[ test]
2268
2274
fn binary_file ( ) {
2269
2275
let mut bytes = [ 0 ; 1024 ] ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub struct OpenOptions {
69
69
attributes : c:: DWORD ,
70
70
share_mode : c:: DWORD ,
71
71
security_qos_flags : c:: DWORD ,
72
- security_attributes : c :: LPSECURITY_ATTRIBUTES ,
72
+ security_attributes : usize , // FIXME: should be a reference
73
73
}
74
74
75
75
#[ derive( Clone , PartialEq , Eq , Debug ) ]
@@ -170,7 +170,7 @@ impl OpenOptions {
170
170
share_mode : c:: FILE_SHARE_READ | c:: FILE_SHARE_WRITE | c:: FILE_SHARE_DELETE ,
171
171
attributes : 0 ,
172
172
security_qos_flags : 0 ,
173
- security_attributes : ptr :: null_mut ( ) ,
173
+ security_attributes : 0 ,
174
174
}
175
175
}
176
176
@@ -187,7 +187,7 @@ impl OpenOptions {
187
187
pub fn attributes ( & mut self , attrs : u32 ) { self . attributes = attrs; }
188
188
pub fn security_qos_flags ( & mut self , flags : u32 ) { self . security_qos_flags = flags; }
189
189
pub fn security_attributes ( & mut self , attrs : c:: LPSECURITY_ATTRIBUTES ) {
190
- self . security_attributes = attrs;
190
+ self . security_attributes = attrs as usize ;
191
191
}
192
192
193
193
fn get_access_mode ( & self ) -> io:: Result < c:: DWORD > {
You can’t perform that action at this time.
0 commit comments