From 70169924b611b9b68587bd9169f991e3770b7dc7 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Wed, 18 Feb 2026 16:08:34 +0100 Subject: show database debug info --- common/object/src/path.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'common/object/src') diff --git a/common/object/src/path.rs b/common/object/src/path.rs index fc14e6d..0751ff0 100644 --- a/common/object/src/path.rs +++ b/common/object/src/path.rs @@ -5,7 +5,7 @@ */ use crate::{Object, Tag, TypedTag}; -use std::marker::PhantomData; +use std::{fmt::Display, marker::PhantomData}; #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct Path(pub Vec); @@ -36,3 +36,15 @@ impl Path { out } } + +impl Display for Path { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + for (i, c) in self.0.iter().enumerate() { + if i > 0 { + write!(f, ".")?; + } + write!(f, "{c}")?; + } + Ok(()) + } +} -- cgit v1.3