We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
to_string_trait_impl
1 parent ac8a470 commit 8f6346aCopy full SHA for 8f6346a
stackslib/src/net/httpcore.rs
@@ -80,12 +80,12 @@ pub enum TipRequest {
80
81
impl TipRequest {}
82
83
-impl ToString for TipRequest {
84
- fn to_string(&self) -> String {
+impl fmt::Display for TipRequest {
+ fn fmt(&self, f: &mut fmt::Formatter) -> std::fmt::Result {
85
match self {
86
- Self::UseLatestAnchoredTip => "".to_string(),
87
- Self::UseLatestUnconfirmedTip => "latest".to_string(),
88
- Self::SpecificTip(ref tip) => format!("{}", tip),
+ Self::UseLatestAnchoredTip => write!(f, ""),
+ Self::UseLatestUnconfirmedTip => write!(f, "latest"),
+ Self::SpecificTip(ref tip) => write!(f, "{tip}"),
89
}
90
91
0 commit comments