implement Display for Tag entities rather than to_string

This commit is contained in:
cascode _ 2023-10-18 14:19:34 -04:00 committed by cascode
parent c45a76d6a9
commit be60f8cdc2
1 changed files with 4 additions and 3 deletions

View File

@ -77,9 +77,10 @@ impl Tag {
name, name,
} }
} }
}
pub fn to_string(&self) -> String { impl fmt::Display for Tag {
format!("Tag({}::tag::{})", &self.host, &self.name) fn format(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}::tag::{}", self.host.as_ref(), self.name.as_ref())
} }
} }
``` ```