From c9cd018394cde43808ba6b7a66ce09ee244a1281 Mon Sep 17 00:00:00 2001 From: Stephan Dilly Date: Sat, 28 Mar 2020 14:20:23 +0100 Subject: [PATCH] better thread panic error message --- asyncgit/src/diff.rs | 4 +++- asyncgit/src/status.rs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/asyncgit/src/diff.rs b/asyncgit/src/diff.rs index b60d0b41..07d60445 100644 --- a/asyncgit/src/diff.rs +++ b/asyncgit/src/diff.rs @@ -96,7 +96,9 @@ impl AsyncDiff { } if notify { - sender.send(AsyncNotification::Diff).unwrap(); + sender + .send(AsyncNotification::Diff) + .expect("error sending diff"); } }); diff --git a/asyncgit/src/status.rs b/asyncgit/src/status.rs index f190c39b..c1a91b0e 100644 --- a/asyncgit/src/status.rs +++ b/asyncgit/src/status.rs @@ -76,7 +76,9 @@ impl AsyncStatus { } if notify { - sender.send(AsyncNotification::Status).unwrap(); + sender + .send(AsyncNotification::Status) + .expect("error sending status"); } });