From 40d2db709558256ddaeda1cc6a7e49e09d092f07 Mon Sep 17 00:00:00 2001
From: Guillaume Desmottes <guillaume.desmottes@collabora.com>
Date: Tue, 18 Jun 2019 16:33:19 +0530
Subject: [PATCH] gstreamer: caps: make call to to_string() explicit

This one was actually working but better to be safe as it may be
ambigious.
---
 gstreamer/src/caps.rs | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs
index 4101b5661..9fb114aaa 100644
--- a/gstreamer/src/caps.rs
+++ b/gstreamer/src/caps.rs
@@ -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);
+    }
 }