From 108c1357006ed8e0dc5f0288ad881a0fd9235e32 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Mon, 7 Mar 2022 22:02:04 -0800 Subject: [PATCH] Rename: NixFailure -> ChildFailure, NixKilled -> ChildKilled --- src/error.rs | 12 ++++++------ src/nix/deployment/limits.rs | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/error.rs b/src/error.rs index 9758f9a..9db31c7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -19,11 +19,11 @@ pub enum ColmenaError { #[snafu(display("Nix returned invalid response: {}", output))] BadOutput { output: String }, - #[snafu(display("Nix exited with error code: {}", exit_code))] - NixFailure { exit_code: i32 }, + #[snafu(display("Child process exited with error code: {}", exit_code))] + ChildFailure { exit_code: i32 }, - #[snafu(display("Nix was killed by signal {}", signal))] - NixKilled { signal: i32 }, + #[snafu(display("Child process was killed by signal {}", signal))] + ChildKilled { signal: i32 }, #[snafu(display("This operation is not supported"))] Unsupported, @@ -89,8 +89,8 @@ impl From for ColmenaError { impl From for ColmenaError { fn from(status: ExitStatus) -> Self { match status.code() { - Some(exit_code) => Self::NixFailure { exit_code }, - None => Self::NixKilled { signal: status.signal().unwrap() }, + Some(exit_code) => Self::ChildFailure { exit_code }, + None => Self::ChildKilled { signal: status.signal().unwrap() }, } } } diff --git a/src/nix/deployment/limits.rs b/src/nix/deployment/limits.rs index d68d2fa..5b2d402 100644 --- a/src/nix/deployment/limits.rs +++ b/src/nix/deployment/limits.rs @@ -41,7 +41,7 @@ impl ParallelismLimit { /// evaluated at the same time. This can be a problem if you /// are deploying to a large number of nodes at the same time, /// where `nix-instantiate` may consume too much RAM and get -/// killed by the OS (`NixKilled` error). +/// killed by the OS (`ChildKilled` error). /// /// Evaluating each node on its own is not an efficient solution, /// with total CPU time and memory consumption vastly exceeding the