Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use #[inline] for fmt::Debug impls #2600

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/subspace-farmer/src/utils/farmer_piece_getter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pub struct FarmerPieceGetter<PV, NC> {
}

impl<PV, NC> fmt::Debug for FarmerPieceGetter<PV, NC> {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("FarmerPieceGetter").finish_non_exhaustive()
}
Expand Down Expand Up @@ -355,6 +356,7 @@ pub struct WeakFarmerPieceGetter<PV, NC> {
}

impl<PV, NC> fmt::Debug for WeakFarmerPieceGetter<PV, NC> {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("WeakFarmerPieceGetter")
.finish_non_exhaustive()
Expand Down
1 change: 1 addition & 0 deletions crates/subspace-networking/src/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ pub struct Config<LocalRecordProvider> {
}

impl<LocalRecordProvider> fmt::Debug for Config<LocalRecordProvider> {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_struct("Config").finish()
}
Expand Down
1 change: 1 addition & 0 deletions crates/subspace-networking/src/node_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ impl<LocalRecordProvider> fmt::Debug for NodeRunner<LocalRecordProvider>
where
LocalRecordProvider: constructor::LocalRecordProvider + Send + Sync + 'static,
{
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("NodeRunner").finish_non_exhaustive()
}
Expand Down
1 change: 1 addition & 0 deletions crates/subspace-networking/src/utils/piece_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pub struct PieceProvider<PV> {
}

impl<PV> fmt::Debug for PieceProvider<PV> {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
f.debug_struct("PieceProvider").finish_non_exhaustive()
}
Expand Down
Loading