diff options
author | Alex Crichton <alex@alexcrichton.com> | 2019-06-26 08:09:09 -0700 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2019-06-26 08:09:09 -0700 |
commit | 5ba3d18162b23b1b0391c8485ef4e2da9b121837 (patch) | |
tree | cfc7f2b8320d5660954f1d9c14f391872cb51cc7 /src/scripter.rs | |
parent | c38b3418a0d2e5ca5a4c6eee11e99c5739b79d00 (diff) | |
download | rust-installer-5ba3d18162b23b1b0391c8485ef4e2da9b121837.tar.gz |
Move from `error-chain` to `failure`
Diffstat (limited to 'src/scripter.rs')
-rw-r--r-- | src/scripter.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/scripter.rs b/src/scripter.rs index 1f83985..4363230 100644 --- a/src/scripter.rs +++ b/src/scripter.rs @@ -1,6 +1,6 @@ use std::io::Write; - -use crate::errors::*; +use failure::ResultExt; +use crate::Result; use crate::util::*; const TEMPLATE: &'static str = include_str!("../install-template.sh"); @@ -51,7 +51,9 @@ impl Scripter { create_new_executable(&self.output_script)? .write_all(script.as_ref()) - .chain_err(|| format!("failed to write output script '{}'", self.output_script)) + .with_context(|_| format!("failed to write output script '{}'", self.output_script))?; + + Ok(()) } } |