Skip to content

Commit

Permalink
Manual debug implementation for WeakFarmerPieceGetter
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Feb 29, 2024
1 parent 56631d3 commit 52ab059
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/subspace-farmer/src/utils/farmer_piece_getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,17 @@ where
}

/// Weak farmer piece getter, can be upgraded to [`FarmerPieceGetter`]
#[derive(Debug)]
pub struct WeakFarmerPieceGetter<PV, NC> {
inner: Weak<Inner<PV, NC>>,
}

impl<PV, NC> fmt::Debug for WeakFarmerPieceGetter<PV, NC> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("WeakFarmerPieceGetter")
.finish_non_exhaustive()
}
}

impl<PV, NC> Clone for WeakFarmerPieceGetter<PV, NC> {
fn clone(&self) -> Self {
Self {
Expand Down

0 comments on commit 52ab059

Please sign in to comment.