File tree 11 files changed +22
-22
lines changed
11 files changed +22
-22
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,7 @@ mod allocating {
277
277
278
278
impl < ' a > RefToOwned < ' a > for AnyRef < ' a > {
279
279
type Owned = Any ;
280
- fn to_owned ( & self ) -> Self :: Owned {
280
+ fn ref_to_owned ( & self ) -> Self :: Owned {
281
281
Any {
282
282
tag : self . tag ( ) ,
283
283
value : BytesOwned :: from ( self . value ) ,
Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ mod allocating {
379
379
380
380
impl < ' a > RefToOwned < ' a > for BitStringRef < ' a > {
381
381
type Owned = BitString ;
382
- fn to_owned ( & self ) -> Self :: Owned {
382
+ fn ref_to_owned ( & self ) -> Self :: Owned {
383
383
BitString {
384
384
unused_bits : self . unused_bits ,
385
385
bit_length : self . bit_length ,
Original file line number Diff line number Diff line change @@ -150,9 +150,9 @@ mod allocation {
150
150
151
151
impl < ' a > RefToOwned < ' a > for Ia5StringRef < ' a > {
152
152
type Owned = Ia5String ;
153
- fn to_owned ( & self ) -> Self :: Owned {
153
+ fn ref_to_owned ( & self ) -> Self :: Owned {
154
154
Ia5String {
155
- inner : self . inner . to_owned ( ) ,
155
+ inner : self . inner . ref_to_owned ( ) ,
156
156
}
157
157
}
158
158
}
Original file line number Diff line number Diff line change @@ -277,8 +277,8 @@ mod allocating {
277
277
278
278
impl < ' a > RefToOwned < ' a > for IntRef < ' a > {
279
279
type Owned = Int ;
280
- fn to_owned ( & self ) -> Self :: Owned {
281
- let inner = self . inner . to_owned ( ) ;
280
+ fn ref_to_owned ( & self ) -> Self :: Owned {
281
+ let inner = self . inner . ref_to_owned ( ) ;
282
282
283
283
Int { inner }
284
284
}
@@ -384,8 +384,8 @@ mod allocating {
384
384
385
385
impl < ' a > RefToOwned < ' a > for UintRef < ' a > {
386
386
type Owned = Uint ;
387
- fn to_owned ( & self ) -> Self :: Owned {
388
- let inner = self . inner . to_owned ( ) ;
387
+ fn ref_to_owned ( & self ) -> Self :: Owned {
388
+ let inner = self . inner . ref_to_owned ( ) ;
389
389
390
390
Uint { inner }
391
391
}
Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ mod allocation {
221
221
222
222
impl < ' a > RefToOwned < ' a > for PrintableStringRef < ' a > {
223
223
type Owned = PrintableString ;
224
- fn to_owned ( & self ) -> Self :: Owned {
224
+ fn ref_to_owned ( & self ) -> Self :: Owned {
225
225
PrintableString {
226
- inner : self . inner . to_owned ( ) ,
226
+ inner : self . inner . ref_to_owned ( ) ,
227
227
}
228
228
}
229
229
}
Original file line number Diff line number Diff line change @@ -179,9 +179,9 @@ mod allocation {
179
179
180
180
impl < ' a > RefToOwned < ' a > for TeletexStringRef < ' a > {
181
181
type Owned = TeletexString ;
182
- fn to_owned ( & self ) -> Self :: Owned {
182
+ fn ref_to_owned ( & self ) -> Self :: Owned {
183
183
TeletexString {
184
- inner : self . inner . to_owned ( ) ,
184
+ inner : self . inner . ref_to_owned ( ) ,
185
185
}
186
186
}
187
187
}
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ mod allocating {
145
145
146
146
impl < ' a > RefToOwned < ' a > for BytesRef < ' a > {
147
147
type Owned = BytesOwned ;
148
- fn to_owned ( & self ) -> Self :: Owned {
148
+ fn ref_to_owned ( & self ) -> Self :: Owned {
149
149
BytesOwned :: from ( * self )
150
150
}
151
151
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub trait RefToOwned<'a> {
21
21
Self : ' a ;
22
22
23
23
/// Creates a new object taking ownership of the data
24
- fn to_owned ( & self ) -> Self :: Owned ;
24
+ fn ref_to_owned ( & self ) -> Self :: Owned ;
25
25
}
26
26
27
27
impl < T > OwnedToRef for Option < T >
41
41
T :: Owned : OwnedToRef ,
42
42
{
43
43
type Owned = Option < T :: Owned > ;
44
- fn to_owned ( & self ) -> Self :: Owned {
45
- self . as_ref ( ) . map ( |o| o. to_owned ( ) )
44
+ fn ref_to_owned ( & self ) -> Self :: Owned {
45
+ self . as_ref ( ) . map ( |o| o. ref_to_owned ( ) )
46
46
}
47
47
}
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ mod allocating {
85
85
86
86
impl < ' a > RefToOwned < ' a > for StrRef < ' a > {
87
87
type Owned = StrOwned ;
88
- fn to_owned ( & self ) -> Self :: Owned {
88
+ fn ref_to_owned ( & self ) -> Self :: Owned {
89
89
StrOwned :: from ( * self )
90
90
}
91
91
}
Original file line number Diff line number Diff line change @@ -171,10 +171,10 @@ mod allocating {
171
171
172
172
impl < ' a > RefToOwned < ' a > for AlgorithmIdentifierRef < ' a > {
173
173
type Owned = AlgorithmIdentifierOwned ;
174
- fn to_owned ( & self ) -> Self :: Owned {
174
+ fn ref_to_owned ( & self ) -> Self :: Owned {
175
175
AlgorithmIdentifier {
176
176
oid : self . oid ,
177
- parameters : self . parameters . to_owned ( ) ,
177
+ parameters : self . parameters . ref_to_owned ( ) ,
178
178
}
179
179
}
180
180
}
Original file line number Diff line number Diff line change @@ -193,10 +193,10 @@ mod allocating {
193
193
194
194
impl < ' a > RefToOwned < ' a > for SubjectPublicKeyInfoRef < ' a > {
195
195
type Owned = SubjectPublicKeyInfoOwned ;
196
- fn to_owned ( & self ) -> Self :: Owned {
196
+ fn ref_to_owned ( & self ) -> Self :: Owned {
197
197
SubjectPublicKeyInfo {
198
- algorithm : self . algorithm . to_owned ( ) ,
199
- subject_public_key : self . subject_public_key . to_owned ( ) ,
198
+ algorithm : self . algorithm . ref_to_owned ( ) ,
199
+ subject_public_key : self . subject_public_key . ref_to_owned ( ) ,
200
200
}
201
201
}
202
202
}
You can’t perform that action at this time.
0 commit comments