diff options
| author | Peter Atashian <retep998@gmail.com> | 2015-06-08 14:04:22 -0400 |
|---|---|---|
| committer | Peter Atashian <retep998@gmail.com> | 2015-06-08 14:04:22 -0400 |
| commit | b0d535b2ba24cc90caddda53ba7378da378468eb (patch) | |
| tree | fa79420617ae5f466c4e09bf394531d190abe2dc /src/libstd/sys/windows/ext | |
| parent | 61c43b47338b92c447c1f6af5cffec46718e750b (diff) | |
| download | rust-b0d535b2ba24cc90caddda53ba7378da378468eb.tar.gz rust-b0d535b2ba24cc90caddda53ba7378da378468eb.zip | |
OpenOptionsExt on Windows: i32 -> u32
Since all those flags are u32 anyway, avoid unnecessary conversions [breaking change] Signed-off-by: Peter Atashian <retep998@gmail.com>
Diffstat (limited to 'src/libstd/sys/windows/ext')
| -rw-r--r-- | src/libstd/sys/windows/ext/fs.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs index aaffe8dadf8..28d9b3e0476 100644 --- a/src/libstd/sys/windows/ext/fs.rs +++ b/src/libstd/sys/windows/ext/fs.rs @@ -25,41 +25,41 @@ use sys_common::{AsInnerMut, AsInner}; pub trait OpenOptionsExt { /// Overrides the `dwDesiredAccess` argument to the call to `CreateFile` /// with the specified value. - fn desired_access(&mut self, access: i32) -> &mut Self; + fn desired_access(&mut self, access: u32) -> &mut Self; /// Overrides the `dwCreationDisposition` argument to the call to /// `CreateFile` with the specified value. /// /// This will override any values of the standard `create` flags, for /// example. - fn creation_disposition(&mut self, val: i32) -> &mut Self; + fn creation_disposition(&mut self, val: u32) -> &mut Self; /// Overrides the `dwFlagsAndAttributes` argument to the call to /// `CreateFile` with the specified value. /// /// This will override any values of the standard flags on the /// `OpenOptions` structure. - fn flags_and_attributes(&mut self, val: i32) -> &mut Self; + fn flags_and_attributes(&mut self, val: u32) -> &mut Self; /// Overrides the `dwShareMode` argument to the call to `CreateFile` with /// the specified value. /// /// This will override any values of the standard flags on the /// `OpenOptions` structure. - fn share_mode(&mut self, val: i32) -> &mut Self; + fn share_mode(&mut self, val: u32) -> &mut Self; } impl OpenOptionsExt for OpenOptions { - fn desired_access(&mut self, access: i32) -> &mut OpenOptions { + fn desired_access(&mut self, access: u32) -> &mut OpenOptions { self.as_inner_mut().desired_access(access); self } - fn creation_disposition(&mut self, access: i32) -> &mut OpenOptions { + fn creation_disposition(&mut self, access: u32) -> &mut OpenOptions { self.as_inner_mut().creation_disposition(access); self } - fn flags_and_attributes(&mut self, access: i32) -> &mut OpenOptions { + fn flags_and_attributes(&mut self, access: u32) -> &mut OpenOptions { self.as_inner_mut().flags_and_attributes(access); self } - fn share_mode(&mut self, access: i32) -> &mut OpenOptions { + fn share_mode(&mut self, access: u32) -> &mut OpenOptions { self.as_inner_mut().share_mode(access); self } } |
