From db188925d50feef85025ca2770eb6bef158303bc Mon Sep 17 00:00:00 2001 From: Taeer Bar-Yam Date: Tue, 8 Aug 2023 06:27:56 -0400 Subject: [PATCH] clippy --- core/src/eval/operation.rs | 2 +- core/src/nix_ffi/mod.rs | 4 ++-- flake.nix | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/eval/operation.rs b/core/src/eval/operation.rs index 814803e865..fbf267a481 100644 --- a/core/src/eval/operation.rs +++ b/core/src/eval/operation.rs @@ -1149,7 +1149,7 @@ impl VirtualMachine { if let Term::Str(s) = &*t { let json = nix_ffi::eval_to_json(&String::from(s)).map_err(|e| { EvalError::Other( - format!("nix code failed to evaluate:\n {}", e.what().to_string()), + format!("nix code failed to evaluate:\n {}", e.what()), pos, ) })?; diff --git a/core/src/nix_ffi/mod.rs b/core/src/nix_ffi/mod.rs index a419b4ad03..8851fcaa1f 100644 --- a/core/src/nix_ffi/mod.rs +++ b/core/src/nix_ffi/mod.rs @@ -1,10 +1,10 @@ #![cfg(feature = "nix-experimental")] #[cxx::bridge] -mod nix_ffi { +mod internal { unsafe extern "C++" { include!("nickel-lang-core/src/nix_ffi/cpp/nix.hh"); fn eval_to_json(nix_code: &str) -> Result; } } -pub use nix_ffi::*; +pub use internal::*; diff --git a/flake.nix b/flake.nix index c1ee0914cc..2c46923bfc 100644 --- a/flake.nix +++ b/flake.nix @@ -171,6 +171,7 @@ txtFilter = mkFilter ".*txt$"; snapFilter = mkFilter ".*snap$"; scmFilter = mkFilter ".*scm$"; + cxxFilter = mkFilter ".*(cc|hh)$"; importsFilter = mkFilter ".*/core/tests/integration/imports/imported/.*$"; # include all files that are imported in tests in pkgs.lib.cleanSourceWith { @@ -185,6 +186,7 @@ txtFilter snapFilter scmFilter + cxxFilter filterCargoSources importsFilter ];