]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #93471 - cuviper:direntry-file_type-stat, r=the8472
authorMatthias Krüger <matthias.krueger@famsik.de>
Mon, 31 Jan 2022 06:00:44 +0000 (07:00 +0100)
committerGitHub <noreply@github.com>
Mon, 31 Jan 2022 06:00:44 +0000 (07:00 +0100)
unix: Use metadata for `DirEntry::file_type` fallback

When `DirEntry::file_type` fails to match a known `d_type`, we should
fall back to `DirEntry::metadata` instead of a bare `lstat`, because
this is faster and more reliable on targets with `fstatat`.

1  2 
library/std/src/sys/unix/fs.rs

Simple merge