fix(tvix/eval/io): OsStringExt and std::fs::File import are impure-only

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>
This commit is contained in:
Florian Klink 2024-05-26 20:18:08 +02:00 committed by clbot
parent 8089682bb5
commit db68c104af

View file

@ -16,14 +16,16 @@
//! how store paths are opened and so on. //! how store paths are opened and so on.
use std::{ use std::{
fs::File,
io, io,
path::{Path, PathBuf}, path::{Path, PathBuf},
}; };
#[cfg(target_family = "unix")] #[cfg(all(target_family = "unix", feature = "impure"))]
use std::os::unix::ffi::OsStringExt; use std::os::unix::ffi::OsStringExt;
#[cfg(feature = "impure")]
use std::fs::File;
/// Types of files as represented by `builtins.readDir` in Nix. /// Types of files as represented by `builtins.readDir` in Nix.
#[derive(Debug)] #[derive(Debug)]
pub enum FileType { pub enum FileType {