Implement source into Display for AssetPath (#10217)
# Objective When debugging and printing asset paths, I am not 100% if I am in the right source or not ## Solution Add the output of the source
This commit is contained in:
parent
60773e6787
commit
f9ef989def
@ -67,6 +67,9 @@ impl<'a> Debug for AssetPath<'a> {
|
|||||||
|
|
||||||
impl<'a> Display for AssetPath<'a> {
|
impl<'a> Display for AssetPath<'a> {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
|
if let AssetSourceId::Name(name) = self.source() {
|
||||||
|
write!(f, "{name}://")?;
|
||||||
|
}
|
||||||
write!(f, "{}", self.path.display())?;
|
write!(f, "{}", self.path.display())?;
|
||||||
if let Some(label) = &self.label {
|
if let Some(label) = &self.label {
|
||||||
write!(f, "#{label}")?;
|
write!(f, "#{label}")?;
|
||||||
|
Loading…
Reference in New Issue
Block a user