mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
gstreamer: caps: make call to to_string() explicit
This one was actually working but better to be safe as it may be ambigious.
This commit is contained in:
parent
cd16337874
commit
40d2db7095
1 changed files with 9 additions and 1 deletions
|
@ -509,7 +509,7 @@ impl fmt::Debug for CapsRef {
|
|||
|
||||
impl fmt::Display for CapsRef {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.write_str(&self.to_string())
|
||||
f.write_str(&CapsRef::to_string(self))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -652,4 +652,12 @@ mod tests {
|
|||
.build();
|
||||
assert_eq!(caps.to_string(), "foo/bar(foo:bla, foo:baz), int=(int)12");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_display() {
|
||||
::init().unwrap();
|
||||
|
||||
let caps = Caps::new_simple("foo/bar", &[]);
|
||||
format!("{}", caps);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue