Skip to content

Commit

Permalink
Revert "refactor(errors): improve message and add logging when sendin…
Browse files Browse the repository at this point in the history
…g tree from backend panics" (#325)

Reverts #314
Related rustic-rs/rustic#1313
  • Loading branch information
simonsan authored Oct 10, 2024
1 parent 0f61e3c commit 81c127e
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions crates/core/src/blob/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ use derive_setters::Setters;
use ignore::overrides::{Override, OverrideBuilder};
use ignore::Match;

use log::debug;
use serde::{Deserialize, Deserializer};
use serde_derive::Serialize;

Expand Down Expand Up @@ -690,17 +689,9 @@ impl<P: Progress> TreeStreamerOnce<P> {
let out_tx = out_tx.clone();
let _join_handle = std::thread::spawn(move || {
for (path, id, count) in in_rx {
debug!("Loading tree {id} from {path:?} with count {count}");

if let Err(err) = out_tx.try_send(
Tree::from_backend(&be, &index, id).map(|tree| (path, tree, count)),
) {
panic!("
Sending tree {id} on channel failed: {err}.
This should not happen! Please report it to the developers: https://github.com/rustic-rs/rustic_core/issues/new
");
}
out_tx
.send(Tree::from_backend(&be, &index, id).map(|tree| (path, tree, count)))
.unwrap();
}
});
}
Expand Down

0 comments on commit 81c127e

Please sign in to comment.