We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb0daec commit efe17deCopy full SHA for efe17de
src/cargo/core/resolver/errors.rs
@@ -326,9 +326,7 @@ pub(super) fn activation_error(
326
name_candidates.sort_by_key(|o| o.0);
327
328
let mut msg: String;
329
- if name_candidates.is_empty() {
330
- msg = format!("no matching package named `{}` found\n", dep.package_name());
331
- } else {
+ if !name_candidates.is_empty() {
332
msg = format!(
333
"no matching package found\nsearched package name: `{}`\n",
334
dep.package_name()
@@ -354,6 +352,8 @@ pub(super) fn activation_error(
354
352
},
355
353
));
356
msg.push('\n');
+ } else {
+ msg = format!("no matching package named `{}` found\n", dep.package_name());
357
}
358
359
let mut location_searched_msg = registry.describe_source(dep.source_id());
0 commit comments