File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2264,6 +2264,12 @@ mod tests {
22642264 assert_eq ! ( check!( fs:: metadata( & tmpdir. join( "h" ) ) ) . len( ) , 9 ) ;
22652265 }
22662266
2267+ #[ test]
2268+ fn _assert_send_sync ( ) {
2269+ fn _assert_send_sync < T : Send + Sync > ( ) { }
2270+ _assert_send_sync :: < OpenOptions > ( ) ;
2271+ }
2272+
22672273 #[ test]
22682274 fn binary_file ( ) {
22692275 let mut bytes = [ 0 ; 1024 ] ;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ pub struct OpenOptions {
6969 attributes : c:: DWORD ,
7070 share_mode : c:: DWORD ,
7171 security_qos_flags : c:: DWORD ,
72- security_attributes : c :: LPSECURITY_ATTRIBUTES ,
72+ security_attributes : usize , // FIXME: should be a reference
7373}
7474
7575#[ derive( Clone , PartialEq , Eq , Debug ) ]
@@ -170,7 +170,7 @@ impl OpenOptions {
170170 share_mode : c:: FILE_SHARE_READ | c:: FILE_SHARE_WRITE | c:: FILE_SHARE_DELETE ,
171171 attributes : 0 ,
172172 security_qos_flags : 0 ,
173- security_attributes : ptr :: null_mut ( ) ,
173+ security_attributes : 0 ,
174174 }
175175 }
176176
@@ -187,7 +187,7 @@ impl OpenOptions {
187187 pub fn attributes ( & mut self , attrs : u32 ) { self . attributes = attrs; }
188188 pub fn security_qos_flags ( & mut self , flags : u32 ) { self . security_qos_flags = flags; }
189189 pub fn security_attributes ( & mut self , attrs : c:: LPSECURITY_ATTRIBUTES ) {
190- self . security_attributes = attrs;
190+ self . security_attributes = attrs as usize ;
191191 }
192192
193193 fn get_access_mode ( & self ) -> io:: Result < c:: DWORD > {
You can’t perform that action at this time.
0 commit comments