diff options
author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-04-06 15:26:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 15:26:25 -0400 |
commit | d66f476b4d5e7fdf1ec215c9ac16c923dc292324 (patch) | |
tree | 75363152b1230dc2ee293569609945ae809c4dd3 /src/generator.rs | |
parent | 0a22f4fb63de9f52be81c18e6fefec1e50277625 (diff) | |
parent | 9a112b3352ed13b56d6fe801dcf9a995c191a851 (diff) | |
download | rust-installer-d66f476b4d5e7fdf1ec215c9ac16c923dc292324.tar.gz |
Merge pull request #101 from cuviper/anyhow
Migrate from failure to anyhow
Diffstat (limited to 'src/generator.rs')
-rw-r--r-- | src/generator.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/generator.rs b/src/generator.rs index 3b4b0d4..ecf73ca 100644 --- a/src/generator.rs +++ b/src/generator.rs @@ -1,8 +1,7 @@ use super::Scripter; use super::Tarballer; use crate::util::*; -use crate::Result; -use failure::{format_err, bail, ResultExt}; +use anyhow::{bail, format_err, Context, Result}; use std::io::Write; use std::path::Path; @@ -62,7 +61,7 @@ impl Generator { // Write the component name let components = package_dir.join("components"); writeln!(create_new_file(components)?, "{}", self.component_name) - .with_context(|_| "failed to write the component file")?; + .context("failed to write the component file")?; // Write the installer version (only used by combine-installers.sh) let version = package_dir.join("rust-installer-version"); @@ -71,7 +70,7 @@ impl Generator { "{}", crate::RUST_INSTALLER_VERSION ) - .with_context(|_| "failed to write new installer version")?; + .context("failed to write new installer version")?; // Copy the overlay if !self.non_installed_overlay.is_empty() { |