Skip to content

Commit 32c589b

Browse files
committed
Modify code style as per comments
1 parent 0aad0b3 commit 32c589b

File tree

1 file changed

+5
-7
lines changed
  • library/std/src/sys/windows

1 file changed

+5
-7
lines changed

library/std/src/sys/windows/fs.rs

+5-7
Original file line numberDiff line numberDiff line change
@@ -1237,17 +1237,15 @@ pub fn link(_original: &Path, _link: &Path) -> io::Result<()> {
12371237

12381238
pub fn stat(path: &Path) -> io::Result<FileAttr> {
12391239
match metadata(path, ReparsePoint::Follow) {
1240-
Err(err) => {
1241-
if err.raw_os_error() == Some(c::ERROR_CANT_ACCESS_FILE as i32) {
1242-
if let Ok(attrs) = lstat(path) {
1243-
if !attrs.file_type().is_symlink() {
1244-
return Ok(attrs);
1245-
}
1240+
Err(err) if err.raw_os_error() == Some(c::ERROR_CANT_ACCESS_FILE as i32) => {
1241+
if let Ok(attrs) = lstat(path) {
1242+
if !attrs.file_type().is_symlink() {
1243+
return Ok(attrs);
12461244
}
12471245
}
12481246
Err(err)
12491247
}
1250-
Ok(attrs) => Ok(attrs),
1248+
result => result,
12511249
}
12521250
}
12531251

0 commit comments

Comments
 (0)