@@ -184,28 +184,24 @@ pub enum MaybePackage {
184
184
} ,
185
185
}
186
186
187
+ /// A blanket implementation forwards all methods to [`Source`].
187
188
impl < ' a , T : Source + ?Sized + ' a > Source for Box < T > {
188
- /// Forwards to `Source::source_id`.
189
189
fn source_id ( & self ) -> SourceId {
190
190
( * * self ) . source_id ( )
191
191
}
192
192
193
- /// Forwards to `Source::replaced_source_id`.
194
193
fn replaced_source_id ( & self ) -> SourceId {
195
194
( * * self ) . replaced_source_id ( )
196
195
}
197
196
198
- /// Forwards to `Source::supports_checksums`.
199
197
fn supports_checksums ( & self ) -> bool {
200
198
( * * self ) . supports_checksums ( )
201
199
}
202
200
203
- /// Forwards to `Source::requires_precise`.
204
201
fn requires_precise ( & self ) -> bool {
205
202
( * * self ) . requires_precise ( )
206
203
}
207
204
208
- /// Forwards to `Source::query`.
209
205
fn query (
210
206
& mut self ,
211
207
dep : & Dependency ,
@@ -223,7 +219,6 @@ impl<'a, T: Source + ?Sized + 'a> Source for Box<T> {
223
219
( * * self ) . set_quiet ( quiet)
224
220
}
225
221
226
- /// Forwards to `Source::download`.
227
222
fn download ( & mut self , id : PackageId ) -> CargoResult < MaybePackage > {
228
223
( * * self ) . download ( id)
229
224
}
@@ -232,12 +227,10 @@ impl<'a, T: Source + ?Sized + 'a> Source for Box<T> {
232
227
( * * self ) . finish_download ( id, data)
233
228
}
234
229
235
- /// Forwards to `Source::fingerprint`.
236
230
fn fingerprint ( & self , pkg : & Package ) -> CargoResult < String > {
237
231
( * * self ) . fingerprint ( pkg)
238
232
}
239
233
240
- /// Forwards to `Source::verify`.
241
234
fn verify ( & self , pkg : PackageId ) -> CargoResult < ( ) > {
242
235
( * * self ) . verify ( pkg)
243
236
}
@@ -263,6 +256,7 @@ impl<'a, T: Source + ?Sized + 'a> Source for Box<T> {
263
256
}
264
257
}
265
258
259
+ /// A blanket implementation forwards all methods to [`Source`].
266
260
impl < ' a , T : Source + ?Sized + ' a > Source for & ' a mut T {
267
261
fn source_id ( & self ) -> SourceId {
268
262
( * * self ) . source_id ( )
0 commit comments