about summary refs log tree commit diff
path: root/src/liballoc/borrow.rs
diff options
context:
space:
mode:
authorIlija Tovilo <ilija.tovilo@me.com>2019-07-31 21:00:35 +0200
committerIlija Tovilo <ilija.tovilo@me.com>2019-08-08 22:39:15 +0200
commit3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a (patch)
tree9d577f11fb6f00c835bf70b13d8a90e7934719e1 /src/liballoc/borrow.rs
parentd4abb08be6c3a06a14e285396f5e3ef367584f77 (diff)
downloadrust-3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a.tar.gz
rust-3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a.zip
Use associated_type_bounds where applicable - closes #61738
Diffstat (limited to 'src/liballoc/borrow.rs')
-rw-r--r--src/liballoc/borrow.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/liballoc/borrow.rs b/src/liballoc/borrow.rs
index d5e15b3719c..a9c5bce4c25 100644
--- a/src/liballoc/borrow.rs
+++ b/src/liballoc/borrow.rs
@@ -329,8 +329,8 @@ impl<'a, B: ?Sized> PartialOrd for Cow<'a, B>
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<B: ?Sized> fmt::Debug for Cow<'_, B>
-    where B: fmt::Debug + ToOwned,
-          <B as ToOwned>::Owned: fmt::Debug
+where
+    B: fmt::Debug + ToOwned<Owned: fmt::Debug>,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match *self {
@@ -342,8 +342,8 @@ impl<B: ?Sized> fmt::Debug for Cow<'_, B>
 
 #[stable(feature = "rust1", since = "1.0.0")]
 impl<B: ?Sized> fmt::Display for Cow<'_, B>
-    where B: fmt::Display + ToOwned,
-          <B as ToOwned>::Owned: fmt::Display
+where
+    B: fmt::Display + ToOwned<Owned: fmt::Display>,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         match *self {
@@ -355,8 +355,8 @@ impl<B: ?Sized> fmt::Display for Cow<'_, B>
 
 #[stable(feature = "default", since = "1.11.0")]
 impl<B: ?Sized> Default for Cow<'_, B>
-    where B: ToOwned,
-          <B as ToOwned>::Owned: Default
+where
+    B: ToOwned<Owned: Default>,
 {
     /// Creates an owned Cow<'a, B> with the default value for the contained owned value.
     fn default() -> Self {