@@ -63,7 +63,9 @@ pub trait ToOwned {
6363}
6464
6565#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66- impl < T > ToOwned for T where T : Clone {
66+ impl < T > ToOwned for T
67+ where T : Clone
68+ {
6769 type Owned = T ;
6870 fn to_owned ( & self ) -> T {
6971 self . clone ( )
@@ -117,17 +119,19 @@ pub enum Cow<'a, B: ?Sized + 'a>
117119{
118120 /// Borrowed data.
119121 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
120- Borrowed ( #[ stable( feature = "rust1" , since = "1.0.0" ) ] & ' a B ) ,
122+ Borrowed ( #[ stable( feature = "rust1" , since = "1.0.0" ) ]
123+ & ' a B ) ,
121124
122125 /// Owned data.
123126 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
124- Owned (
125- #[ stable( feature = "rust1" , since = "1.0.0" ) ] <B as ToOwned >:: Owned
126- ) ,
127+ Owned ( #[ stable( feature = "rust1" , since = "1.0.0" ) ]
128+ <B as ToOwned >:: Owned ) ,
127129}
128130
129131#[ stable( feature = "rust1" , since = "1.0.0" ) ]
130- impl < ' a , B : ?Sized > Clone for Cow < ' a , B > where B : ToOwned {
132+ impl < ' a , B : ?Sized > Clone for Cow < ' a , B >
133+ where B : ToOwned
134+ {
131135 fn clone ( & self ) -> Cow < ' a , B > {
132136 match * self {
133137 Borrowed ( b) => Borrowed ( b) ,
@@ -139,7 +143,9 @@ impl<'a, B: ?Sized> Clone for Cow<'a, B> where B: ToOwned {
139143 }
140144}
141145
142- impl < ' a , B : ?Sized > Cow < ' a , B > where B : ToOwned {
146+ impl < ' a , B : ?Sized > Cow < ' a , B >
147+ where B : ToOwned
148+ {
143149 /// Acquires a mutable reference to the owned form of the data.
144150 ///
145151 /// Clones the data if it is not already owned.
@@ -194,7 +200,9 @@ impl<'a, B: ?Sized> Cow<'a, B> where B: ToOwned {
194200}
195201
196202#[ stable( feature = "rust1" , since = "1.0.0" ) ]
197- impl < ' a , B : ?Sized > Deref for Cow < ' a , B > where B : ToOwned {
203+ impl < ' a , B : ?Sized > Deref for Cow < ' a , B >
204+ where B : ToOwned
205+ {
198206 type Target = B ;
199207
200208 fn deref ( & self ) -> & B {
@@ -209,7 +217,9 @@ impl<'a, B: ?Sized> Deref for Cow<'a, B> where B: ToOwned {
209217impl < ' a , B : ?Sized > Eq for Cow < ' a , B > where B : Eq + ToOwned { }
210218
211219#[ stable( feature = "rust1" , since = "1.0.0" ) ]
212- impl < ' a , B : ?Sized > Ord for Cow < ' a , B > where B : Ord + ToOwned {
220+ impl < ' a , B : ?Sized > Ord for Cow < ' a , B >
221+ where B : Ord + ToOwned
222+ {
213223 #[ inline]
214224 fn cmp ( & self , other : & Cow < ' a , B > ) -> Ordering {
215225 Ord :: cmp ( & * * self , & * * other)
@@ -228,7 +238,9 @@ impl<'a, 'b, B: ?Sized, C: ?Sized> PartialEq<Cow<'b, C>> for Cow<'a, B>
228238}
229239
230240#[ stable( feature = "rust1" , since = "1.0.0" ) ]
231- impl < ' a , B : ?Sized > PartialOrd for Cow < ' a , B > where B : PartialOrd + ToOwned {
241+ impl < ' a , B : ?Sized > PartialOrd for Cow < ' a , B >
242+ where B : PartialOrd + ToOwned
243+ {
232244 #[ inline]
233245 fn partial_cmp ( & self , other : & Cow < ' a , B > ) -> Option < Ordering > {
234246 PartialOrd :: partial_cmp ( & * * self , & * * other)
@@ -273,7 +285,9 @@ impl<'a, B: ?Sized> Default for Cow<'a, B>
273285}
274286
275287#[ stable( feature = "rust1" , since = "1.0.0" ) ]
276- impl < ' a , B : ?Sized > Hash for Cow < ' a , B > where B : Hash + ToOwned {
288+ impl < ' a , B : ?Sized > Hash for Cow < ' a , B >
289+ where B : Hash + ToOwned
290+ {
277291 #[ inline]
278292 fn hash < H : Hasher > ( & self , state : & mut H ) {
279293 Hash :: hash ( & * * self , state)
0 commit comments