From f5989b4d66dcad6cd8b25d6bbfdadead19ff47b9 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 1 Jun 2026 12:29:15 +0200 Subject: [PATCH] dist: move display_name() before other methods that it calls --- src/dist/manifest.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/dist/manifest.rs b/src/dist/manifest.rs index 8f6e10626e..aba146f00d 100644 --- a/src/dist/manifest.rs +++ b/src/dist/manifest.rs @@ -58,6 +58,15 @@ pub struct Manifest { } impl Manifest { + pub(crate) fn display_name(&self, component: &Component, host_target: &TargetTuple) -> String { + match &component.target { + Some(component_target) if *host_target == *component_target => { + self.short_name(component).to_owned() + } + _ => self.name(component), + } + } + /// Returns the [`Component`]'s name **before** renaming, including the target if present. /// For the name after renaming, see [`Component::name()`]. pub(crate) fn name(&self, component: &Component) -> String { @@ -87,15 +96,6 @@ impl Manifest { &component.pkg } } - - pub(crate) fn display_name(&self, component: &Component, host_target: &TargetTuple) -> String { - match &component.target { - Some(component_target) if *host_target == *component_target => { - self.short_name(component).to_owned() - } - _ => self.name(component), - } - } } #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]