@@ -584,19 +584,19 @@ impl Summaries {
584
584
) -> Poll < CargoResult < Option < Summaries > > > {
585
585
// This is the file we're loading from cache or the index data.
586
586
// See module comment in `registry/mod.rs` for why this is structured the way it is.
587
- let name = & name. to_lowercase ( ) ;
588
- let relative = make_dep_path ( & name , false ) ;
587
+ let lowered_name = & name. to_lowercase ( ) ;
588
+ let relative = make_dep_path ( & lowered_name , false ) ;
589
589
590
590
let mut cached_summaries = None ;
591
591
let mut index_version = None ;
592
- if let Some ( contents) = cache_manager. get ( name ) {
592
+ if let Some ( contents) = cache_manager. get ( lowered_name ) {
593
593
match Summaries :: parse_cache ( contents) {
594
594
Ok ( ( s, v) ) => {
595
595
cached_summaries = Some ( s) ;
596
596
index_version = Some ( v) ;
597
597
}
598
598
Err ( e) => {
599
- tracing:: debug!( "failed to parse {name :?} cache: {e}" ) ;
599
+ tracing:: debug!( "failed to parse {lowered_name :?} cache: {e}" ) ;
600
600
}
601
601
}
602
602
}
@@ -609,7 +609,7 @@ impl Summaries {
609
609
return Poll :: Ready ( Ok ( cached_summaries) ) ;
610
610
}
611
611
LoadResponse :: NotFound => {
612
- cache_manager. invalidate ( name ) ;
612
+ cache_manager. invalidate ( lowered_name ) ;
613
613
return Poll :: Ready ( Ok ( None ) ) ;
614
614
}
615
615
LoadResponse :: Data {
@@ -658,7 +658,7 @@ impl Summaries {
658
658
// Once we have our `cache_bytes` which represents the `Summaries` we're
659
659
// about to return, write that back out to disk so future Cargo
660
660
// invocations can use it.
661
- cache_manager. put ( name , & cache_bytes) ;
661
+ cache_manager. put ( lowered_name , & cache_bytes) ;
662
662
663
663
// If we've got debug assertions enabled read back in the cached values
664
664
// and assert they match the expected result.
0 commit comments