Skip to content

Commit

Permalink
Merge pull request #2571 from subspace/debug-impl-for-farmer-piece-ge…
Browse files Browse the repository at this point in the history
…tter

Debug implementation for `FarmerPieceGetter`
  • Loading branch information
nazar-pc authored Feb 29, 2024
2 parents 3765fa4 + 2a73f52 commit 3404ca3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/subspace-farmer/src/utils/farmer_piece_getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use backoff::ExponentialBackoff;
use parking_lot::Mutex;
use std::collections::HashMap;
use std::error::Error;
use std::fmt;
use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::{Arc, Weak};
use subspace_core_primitives::{Piece, PieceIndex};
Expand Down Expand Up @@ -41,6 +42,12 @@ pub struct FarmerPieceGetter<PV, NC> {
inner: Arc<Inner<PV, NC>>,
}

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

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

0 comments on commit 3404ca3

Please sign in to comment.