diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2021-10-11 00:34:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 00:34:39 +0200 |
| commit | 9c4791300a164b587882cbee52b82ab252252fa6 (patch) | |
| tree | 103750a5fa0a2a87b9b4cc013d87846cdf26cf65 /library/std/src/sys | |
| parent | 1b8f7a9db5cd39d89008cf70961a0c7494b05f67 (diff) | |
| parent | 8545472a081f5ead6bff98ae45b07b13ec6932bf (diff) | |
| download | rust-9c4791300a164b587882cbee52b82ab252252fa6.tar.gz rust-9c4791300a164b587882cbee52b82ab252252fa6.zip | |
Rollup merge of #89707 - clemenswasser:apply_clippy_suggestions, r=Mark-Simulacrum
Apply clippy suggestions for std
Diffstat (limited to 'library/std/src/sys')
| -rw-r--r-- | library/std/src/sys/windows/fs.rs | 4 | ||||
| -rw-r--r-- | library/std/src/sys/windows/stack_overflow.rs | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/library/std/src/sys/windows/fs.rs b/library/std/src/sys/windows/fs.rs index cc137771bb8..ad550a823ae 100644 --- a/library/std/src/sys/windows/fs.rs +++ b/library/std/src/sys/windows/fs.rs @@ -558,7 +558,7 @@ impl IntoInner<Handle> for File { impl FromInner<Handle> for File { fn from_inner(handle: Handle) -> File { - File { handle: handle } + File { handle } } } @@ -672,7 +672,7 @@ impl FilePermissions { impl FileType { fn new(attrs: c::DWORD, reparse_tag: c::DWORD) -> FileType { - FileType { attributes: attrs, reparse_tag: reparse_tag } + FileType { attributes: attrs, reparse_tag } } pub fn is_dir(&self) -> bool { !self.is_symlink() && self.is_directory() diff --git a/library/std/src/sys/windows/stack_overflow.rs b/library/std/src/sys/windows/stack_overflow.rs index 755dc0a6c8b..18a2a36ad25 100644 --- a/library/std/src/sys/windows/stack_overflow.rs +++ b/library/std/src/sys/windows/stack_overflow.rs @@ -9,10 +9,10 @@ impl Handler { pub unsafe fn new() -> Handler { // This API isn't available on XP, so don't panic in that case and just // pray it works out ok. - if c::SetThreadStackGuarantee(&mut 0x5000) == 0 { - if c::GetLastError() as u32 != c::ERROR_CALL_NOT_IMPLEMENTED as u32 { - panic!("failed to reserve stack space for exception handling"); - } + if c::SetThreadStackGuarantee(&mut 0x5000) == 0 + && c::GetLastError() as u32 != c::ERROR_CALL_NOT_IMPLEMENTED as u32 + { + panic!("failed to reserve stack space for exception handling"); } Handler } |
