Migrate from failure to anyhow/thiserror (#273)

This commit is contained in:
Roey Darwish Dror
2019-12-11 23:05:38 +02:00
committed by GitHub
parent 1ea9b91e11
commit ba516aa1dd
22 changed files with 259 additions and 335 deletions

View File

@@ -1,4 +1,4 @@
use crate::error::{Error, ErrorKind};
use crate::error::TopgradeError;
use crate::executor::RunType;
use crate::terminal::print_separator;
use crate::utils::require_option;
@@ -6,7 +6,7 @@ use failure::ResultExt;
use std::path::PathBuf;
use std::process::Command;
pub fn upgrade_packages(sudo: Option<&PathBuf>, run_type: RunType) -> Result<(), Error> {
pub fn upgrade_packages(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
let sudo = require_option(sudo)?;
print_separator("DrgaonFly BSD Packages");
run_type
@@ -15,7 +15,7 @@ pub fn upgrade_packages(sudo: Option<&PathBuf>, run_type: RunType) -> Result<(),
.check_run()
}
pub fn audit_packages(sudo: &Option<PathBuf>) -> Result<(), Error> {
pub fn audit_packages(sudo: &Option<PathBuf>) -> Result<()> {
if let Some(sudo) = sudo {
println!();
Command::new(sudo)