Skip to content

Commit

Permalink
revoke the commit "This code causes tarpaulin wrong coverage report. …
Browse files Browse the repository at this point in the history
…For more details, see: xd009642/tarpaulin#1624"
  • Loading branch information
Yanni Wang committed Sep 28, 2024
1 parent 1d045c0 commit cf74637
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/subscription/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,8 @@ impl Subscription {

impl Drop for Subscription {
fn drop(&mut self) {
// This code causes tarpaulin wrong coverage report. For more details, see: https://github.com/xd009642/tarpaulin/issues/1624
// if let Some(action) = self.action.take() {
// action();
// }
// This code is a workaround for the issue above.
match self.dispose.take() {
Some(dispose) => dispose(),
None => {
// Do nothing, using this pattern to avoid clippy warning.
}
if let Some(dispose) = self.dispose.take() {
dispose();
}
}
}
Expand Down

0 comments on commit cf74637

Please sign in to comment.