]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_session/search_paths.rs
Auto merge of #67821 - matthiaskrgr:submodule_upd, r=Xanewok
[rust.git] / src / librustc_session / search_paths.rs
index b9f2ae7618b91d93a0987e965d824def732a57e3..b15f4e8f6c18e5e3b1362f0ec0317998c78c1675 100644 (file)
@@ -1,6 +1,6 @@
-use std::path::{Path, PathBuf};
-use crate::{early_error, config};
 use crate::filesearch::make_target_lib_path;
+use crate::{config, early_error};
+use std::path::{Path, PathBuf};
 
 #[derive(Clone, Debug)]
 pub struct SearchPath {
@@ -60,12 +60,7 @@ pub fn from_sysroot_and_triple(sysroot: &Path, triple: &str) -> Self {
     fn new(kind: PathKind, dir: PathBuf) -> Self {
         // Get the files within the directory.
         let files = match std::fs::read_dir(&dir) {
-            Ok(files) => {
-                files.filter_map(|p| {
-                    p.ok().map(|s| s.path())
-                })
-                .collect::<Vec<_>>()
-            }
+            Ok(files) => files.filter_map(|p| p.ok().map(|s| s.path())).collect::<Vec<_>>(),
             Err(..) => vec![],
         };