Skip to content

Commit 8a2d0a8

Browse files
committed
Don't print crates.io-index URL when Updating
Following the lead from PackageId's Display, only display the registry's URL if it's not the default registry (aka crates.io). Before: $ cargo install lazy_static Updating registry `https://github.com/rust-lang/crates.io-index` After: $ dcargo install lazy_static Updating registry
1 parent b15ee25 commit 8a2d0a8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cargo/core/source/source_id.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,11 @@ impl SourceId {
210210
}
211211

212212
pub fn display_registry(&self) -> String {
213-
format!("registry `{}`", self.url())
213+
if self.is_default_registry() {
214+
"registry".to_string()
215+
} else {
216+
format!("registry `{}`", self.url())
217+
}
214218
}
215219

216220
/// Is this source from a filesystem path

0 commit comments

Comments
 (0)