Skip to content

Commit

Permalink
Drop anyhow dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wezm committed Oct 1, 2021
1 parent f1722bd commit 5fdf101
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
7 changes: 0 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Expand Up @@ -5,7 +5,6 @@ edition = "2018"
license = "MIT"

[dependencies]
anyhow = "1"
byte-unit = "4"
chrono = "0.4"
subprocess = "0.2"
6 changes: 4 additions & 2 deletions src/main.rs
@@ -1,7 +1,7 @@
use anyhow::Result;
use byte_unit::Byte;
use chrono::prelude::*;
use std::collections::{HashMap, HashSet};
use std::error::Error;
use std::str::FromStr;

const VERSION: &'static str = env!("CARGO_PKG_VERSION");
Expand All @@ -10,6 +10,8 @@ const VERSION: &'static str = env!("CARGO_PKG_VERSION");
// check_age, ZFS::list_snapshots, and ZFS::list_datasets_for_snapshot.
const PROPERTY_SNAPKEEP: &str = "at.rollc.at:snapkeep";

type Result<T> = std::result::Result<T, Box<dyn Error>>;

// Describes the number of snapshots to keep for each period.
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
struct RetentionPolicy {
Expand Down Expand Up @@ -253,7 +255,7 @@ impl ZFS {
{
Ok(())
} else {
Err(anyhow::Error::msg("zfs command error"))
Err("zfs command error".into())
}
}

Expand Down

0 comments on commit 5fdf101

Please sign in to comment.