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 {
428428 let url = self . inner . url . as_str ( ) ;
429429 url == CRATES_IO_INDEX
430430 || 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)
432435 }
433436
434437 /// Hashes `self`.
Original file line number Diff line number Diff line change @@ -100,11 +100,17 @@ impl<'cfg> Source for ReplacedSource<'cfg> {
100100 }
101101
102102 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+ }
108114 }
109115
110116 fn is_replaced ( & self ) -> bool {
Original file line number Diff line number Diff line change @@ -2319,13 +2319,13 @@ fn wait_for_publish() {
23192319 . with_status ( 0 )
23202320 . with_stderr (
23212321 "\
2322- [UPDATING] ` crates-io` index
2322+ [UPDATING] crates.io index
23232323[WARNING] manifest has no documentation, [..]
23242324See [..]
23252325[PACKAGING] delay v0.0.1 ([CWD])
23262326[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)
23292329" ,
23302330 )
23312331 . run ( ) ;
@@ -2416,13 +2416,13 @@ fn wait_for_publish_underscore() {
24162416 . with_status ( 0 )
24172417 . with_stderr (
24182418 "\
2419- [UPDATING] ` crates-io` index
2419+ [UPDATING] crates.io index
24202420[WARNING] manifest has no documentation, [..]
24212421See [..]
24222422[PACKAGING] delay_with_underscore v0.0.1 ([CWD])
24232423[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)
24262426" ,
24272427 )
24282428 . run ( ) ;
You can’t perform that action at this time.
0 commit comments