diff options
author | Florian Klink <flokli@flokli.de> | 2024-05-26T18·18+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-05-26T19·52+0000 |
commit | db68c104afd9f9ccbf1380974307e3d796015d20 (patch) | |
tree | 78cc81bf5332fb081659f14ff3834aed2fba10a0 /tvix/eval/src/io.rs | |
parent | 8089682bb57c7db81823a8989d2be32a9ce4c2a1 (diff) |
fix(tvix/eval/io): OsStringExt and std::fs::File import are impure-only r/8175
These are only needed when building with the impure feature enabled. This removes some warnings when building with --no-default-features. Change-Id: I3139d9133d4846aeb1b1b5f3830c0d078d047292 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11720 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/io.rs')
-rw-r--r-- | tvix/eval/src/io.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tvix/eval/src/io.rs b/tvix/eval/src/io.rs index f775077af818..58586030aa08 100644 --- a/tvix/eval/src/io.rs +++ b/tvix/eval/src/io.rs @@ -16,14 +16,16 @@ //! how store paths are opened and so on. use std::{ - fs::File, io, path::{Path, PathBuf}, }; -#[cfg(target_family = "unix")] +#[cfg(all(target_family = "unix", feature = "impure"))] use std::os::unix::ffi::OsStringExt; +#[cfg(feature = "impure")] +use std::fs::File; + /// Types of files as represented by `builtins.readDir` in Nix. #[derive(Debug)] pub enum FileType { |