Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Radvendii committed Aug 8, 2023
1 parent 03ccd28 commit db18892
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/src/eval/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ impl<R: ImportResolver, C: Cache> VirtualMachine<R, C> {
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,
)
})?;
Expand Down
4 changes: 2 additions & 2 deletions core/src/nix_ffi/mod.rs
Original file line number Diff line number Diff line change
@@ -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<String>;
}
}

pub use nix_ffi::*;
pub use internal::*;
2 changes: 2 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -185,6 +186,7 @@
txtFilter
snapFilter
scmFilter
cxxFilter
filterCargoSources
importsFilter
];
Expand Down

0 comments on commit db18892

Please sign in to comment.