File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,10 @@ impl SourceId {
428
428
let url = self . inner . url . as_str ( ) ;
429
429
url == CRATES_IO_INDEX
430
430
|| url == CRATES_IO_HTTP_INDEX
431
- || std:: env:: var ( "__CARGO_TEST_CRATES_IO_URL_DO_NOT_USE_THIS" ) . as_deref ( ) == Ok ( url)
431
+ || std:: env:: var ( "__CARGO_TEST_CRATES_IO_URL_DO_NOT_USE_THIS" )
432
+ . as_deref ( )
433
+ . map ( |u| u. trim_start_matches ( "sparse+" ) )
434
+ == Ok ( url)
432
435
}
433
436
434
437
/// Hashes `self`.
Original file line number Diff line number Diff line change @@ -100,11 +100,17 @@ impl<'cfg> Source for ReplacedSource<'cfg> {
100
100
}
101
101
102
102
fn describe ( & self ) -> String {
103
- format ! (
104
- "{} (which is replacing {})" ,
105
- self . inner. describe( ) ,
106
- self . to_replace
107
- )
103
+ if self . replace_with . is_crates_io ( ) && self . to_replace . is_crates_io ( ) {
104
+ // Built-in source replacement of crates.io for sparse registry or tests
105
+ // doesn't need duplicate description (crates.io replacing crates.io).
106
+ self . inner . describe ( )
107
+ } else {
108
+ format ! (
109
+ "{} (which is replacing {})" ,
110
+ self . inner. describe( ) ,
111
+ self . to_replace
112
+ )
113
+ }
108
114
}
109
115
110
116
fn is_replaced ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -2319,13 +2319,13 @@ fn wait_for_publish() {
2319
2319
. with_status ( 0 )
2320
2320
. with_stderr (
2321
2321
"\
2322
- [UPDATING] ` crates-io` index
2322
+ [UPDATING] crates.io index
2323
2323
[WARNING] manifest has no documentation, [..]
2324
2324
See [..]
2325
2325
[PACKAGING] delay v0.0.1 ([CWD])
2326
2326
[UPLOADING] delay v0.0.1 ([CWD])
2327
- [UPDATING] ` crates-io` index
2328
- [WAITING] on `delay` to propagate to ` crates-io` index (which is replacing registry `crates-io`) (ctrl-c to wait asynchronously)
2327
+ [UPDATING] crates.io index
2328
+ [WAITING] on `delay` to propagate to crates.io index (ctrl-c to wait asynchronously)
2329
2329
" ,
2330
2330
)
2331
2331
. run ( ) ;
@@ -2416,13 +2416,13 @@ fn wait_for_publish_underscore() {
2416
2416
. with_status ( 0 )
2417
2417
. with_stderr (
2418
2418
"\
2419
- [UPDATING] ` crates-io` index
2419
+ [UPDATING] crates.io index
2420
2420
[WARNING] manifest has no documentation, [..]
2421
2421
See [..]
2422
2422
[PACKAGING] delay_with_underscore v0.0.1 ([CWD])
2423
2423
[UPLOADING] delay_with_underscore v0.0.1 ([CWD])
2424
- [UPDATING] ` crates-io` index
2425
- [WAITING] on `delay_with_underscore` to propagate to ` crates-io` index (which is replacing registry `crates-io`) (ctrl-c to wait asynchronously)
2424
+ [UPDATING] crates.io index
2425
+ [WAITING] on `delay_with_underscore` to propagate to crates.io index (ctrl-c to wait asynchronously)
2426
2426
" ,
2427
2427
)
2428
2428
. run ( ) ;
You can’t perform that action at this time.
0 commit comments