Skip to content

Commit 8f6346a

Browse files
committed
chore: Apply Clippy lint to_string_trait_impl
1 parent ac8a470 commit 8f6346a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

stackslib/src/net/httpcore.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ pub enum TipRequest {
8080

8181
impl TipRequest {}
8282

83-
impl ToString for TipRequest {
84-
fn to_string(&self) -> String {
83+
impl fmt::Display for TipRequest {
84+
fn fmt(&self, f: &mut fmt::Formatter) -> std::fmt::Result {
8585
match self {
86-
Self::UseLatestAnchoredTip => "".to_string(),
87-
Self::UseLatestUnconfirmedTip => "latest".to_string(),
88-
Self::SpecificTip(ref tip) => format!("{}", tip),
86+
Self::UseLatestAnchoredTip => write!(f, ""),
87+
Self::UseLatestUnconfirmedTip => write!(f, "latest"),
88+
Self::SpecificTip(ref tip) => write!(f, "{tip}"),
8989
}
9090
}
9191
}

0 commit comments

Comments
 (0)