mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
fix(spec): Don't use 'did you mean' for PackageIdSpec errors
This commit is contained in:
parent
759178e42b
commit
e090b6fcd6
@ -77,7 +77,7 @@ impl PackageIdSpecQuery for PackageIdSpec {
|
||||
.filter(|&id| spec.matches(id))
|
||||
.collect();
|
||||
if !try_matches.is_empty() {
|
||||
suggestion.push_str("\nDid you mean one of these?\n");
|
||||
suggestion.push_str("\nhelp: there are similar package ID specifications:\n");
|
||||
minimize(suggestion, &try_matches, self);
|
||||
}
|
||||
};
|
||||
|
@ -106,7 +106,7 @@ registry+https://github.com/rust-lang/crates.io-index#crates-io@0.1.0
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] package ID specification `https://example.com/crates-io` did not match any packages
|
||||
Did you mean one of these?
|
||||
[HELP] there are similar package ID specifications:
|
||||
|
||||
crates-io@0.1.0
|
||||
|
||||
@ -193,7 +193,7 @@ Please re-run this command with one of the following specifications:
|
||||
.with_status(101)
|
||||
.with_stderr_data(str![[r#"
|
||||
[ERROR] package ID specification `two-ver@0.3.0` did not match any packages
|
||||
Did you mean one of these?
|
||||
[HELP] there are similar package ID specifications:
|
||||
|
||||
two-ver@0.1.0
|
||||
two-ver@0.2.0
|
||||
|
Loading…
x
Reference in New Issue
Block a user