Implement Display for Caps and TagList

This commit is contained in:
Sebastian Dröge 2018-09-28 19:14:35 +03:00
parent 2b029bcdd4
commit ad62d08d65
2 changed files with 12 additions and 0 deletions

View file

@ -116,6 +116,12 @@ impl str::FromStr for Caps {
} }
} }
impl fmt::Display for Caps {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
impl CapsRef { impl CapsRef {
pub fn set_simple(&mut self, values: &[(&str, &ToSendValue)]) { pub fn set_simple(&mut self, values: &[(&str, &ToSendValue)]) {
for &(name, value) in values { for &(name, value) in values {

View file

@ -358,6 +358,12 @@ impl Default for TagList {
} }
} }
impl fmt::Display for TagList {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.0.fmt(f)
}
}
impl TagListRef { impl TagListRef {
pub fn add<'a, T: Tag<'a>>(&mut self, value: &T::TagType, mode: TagMergeMode) pub fn add<'a, T: Tag<'a>>(&mut self, value: &T::TagType, mode: TagMergeMode)
where where