summaryrefslogtreecommitdiffstats
path: root/src/traverse.rs
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2020-07-02 08:33:35 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2020-07-02 08:33:35 +0800
commitaf7a09c53faf9ebeeb8c0a15278b510738d1f34f (patch)
treeb111f49ee3ee6bed4044138e68662786635762dc /src/traverse.rs
parent9ac025f7e546514581aaa96f96b8af476988d384 (diff)
Use 'anyhow' instead of 'failure' to simplify code and reduce bloat
Diffstat (limited to 'src/traverse.rs')
-rw-r--r--src/traverse.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/traverse.rs b/src/traverse.rs
index d19dd9e..0b56aa8 100644
--- a/src/traverse.rs
+++ b/src/traverse.rs
@@ -1,5 +1,5 @@
use crate::{crossdev, get_size_or_panic, InodeFilter, WalkOptions};
-use failure::Error;
+use anyhow::Result;
use filesize::PathExt;
use petgraph::{graph::NodeIndex, stable_graph::StableGraph, Directed, Direction};
use std::{path::PathBuf, time::Duration, time::Instant};
@@ -37,8 +37,8 @@ impl Traversal {
pub fn from_walk(
mut walk_options: WalkOptions,
input: Vec<PathBuf>,
- mut update: impl FnMut(&mut Traversal) -> Result<bool, Error>,
- ) -> Result<Option<Traversal>, Error> {
+ mut update: impl FnMut(&mut Traversal) -> Result<bool>,
+ ) -> Result<Option<Traversal>> {
fn set_size_or_panic(tree: &mut Tree, node_idx: TreeIndex, current_size_at_depth: u128) {
tree.node_weight_mut(node_idx)
.expect("node for parent index we just retrieved")