From db68c104afd9f9ccbf1380974307e3d796015d20 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 26 May 2024 20:18:08 +0200 Subject: 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 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/io.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tvix') 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 { -- cgit 1.4.1