Forráskód Böngészése

xtask: reduce `fs` imports

Tamir Duberstein 3 hete
szülő
commit
fab4fc44b2
1 módosított fájl, 3 hozzáadás és 3 törlés
  1. 3 3
      xtask/src/run.rs

+ 3 - 3
xtask/src/run.rs

@@ -1,7 +1,7 @@
 use std::{
     ffi::OsString,
     fmt::Write as _,
-    fs::{OpenOptions, copy, create_dir_all},
+    fs::{self, OpenOptions},
     io::{BufRead as _, BufReader, Write as _},
     ops::Deref as _,
     path::{Path, PathBuf},
@@ -232,7 +232,7 @@ pub(crate) fn run(opts: Options) -> Result<()> {
             //
             // The end.
 
-            create_dir_all(&cache_dir).context("failed to create cache dir")?;
+            fs::create_dir_all(&cache_dir).context("failed to create cache dir")?;
 
             let gen_init_cpio = cache_dir.join("gen_init_cpio");
             {
@@ -476,7 +476,7 @@ pub(crate) fn run(opts: Options) -> Result<()> {
                     for (name, binary) in binaries {
                         let name = format!("{profile}-{name}");
                         let path = tmp_dir.path().join(&name);
-                        copy(&binary, &path).with_context(|| {
+                        fs::copy(&binary, &path).with_context(|| {
                             format!("copy({}, {}) failed", binary.display(), path.display())
                         })?;
                         let out_path = Path::new("/bin").join(&name);