@@ -324,10 +324,10 @@ fn verify_dependencies(
324
324
325
325
pub ( crate ) fn prepare_transmit (
326
326
gctx : & GlobalContext ,
327
- pkg : & Package ,
327
+ local_pkg : & Package ,
328
328
registry_id : SourceId ,
329
329
) -> CargoResult < NewCrate > {
330
- let deps = pkg
330
+ let deps = local_pkg
331
331
. dependencies ( )
332
332
. iter ( )
333
333
. filter ( |dep| {
@@ -378,7 +378,7 @@ pub(crate) fn prepare_transmit(
378
378
} )
379
379
} )
380
380
. collect :: < CargoResult < Vec < NewCrateDependency > > > ( ) ?;
381
- let manifest = pkg . manifest ( ) ;
381
+ let manifest = local_pkg . manifest ( ) ;
382
382
let ManifestMetadata {
383
383
ref authors,
384
384
ref description,
@@ -398,12 +398,13 @@ pub(crate) fn prepare_transmit(
398
398
let readme_content = readme
399
399
. as_ref ( )
400
400
. map ( |readme| {
401
- paths:: read ( & pkg. root ( ) . join ( readme) )
402
- . with_context ( || format ! ( "failed to read `readme` file for package `{}`" , pkg) )
401
+ paths:: read ( & local_pkg. root ( ) . join ( readme) ) . with_context ( || {
402
+ format ! ( "failed to read `readme` file for package `{}`" , local_pkg)
403
+ } )
403
404
} )
404
405
. transpose ( ) ?;
405
406
if let Some ( ref file) = * license_file {
406
- if !pkg . root ( ) . join ( file) . exists ( ) {
407
+ if !local_pkg . root ( ) . join ( file) . exists ( ) {
407
408
bail ! ( "the license file `{}` does not exist" , file)
408
409
}
409
410
}
@@ -440,8 +441,8 @@ pub(crate) fn prepare_transmit(
440
441
} ;
441
442
442
443
Ok ( NewCrate {
443
- name : pkg . name ( ) . to_string ( ) ,
444
- vers : pkg . version ( ) . to_string ( ) ,
444
+ name : local_pkg . name ( ) . to_string ( ) ,
445
+ vers : local_pkg . version ( ) . to_string ( ) ,
445
446
deps,
446
447
features : string_features,
447
448
authors : authors. clone ( ) ,
0 commit comments