display statement/statement_tmpl as in pod lang v1 (#269)

* display statement/statement_tmpl as in pod lang v1

* fix tests
This commit is contained in:
Eduard S. 2025-06-10 15:06:57 +02:00 committed by GitHub
parent 77c96d5dbe
commit 6feff2ae69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 114 additions and 52 deletions

View file

@ -484,7 +484,7 @@ impl ToFields for Key {
impl fmt::Display for Key {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", self.name)?;
write!(f, "\"{}\"", self.name)?;
Ok(())
}
}
@ -546,7 +546,10 @@ impl AnchoredKey {
impl fmt::Display for AnchoredKey {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}.{}", self.pod_id, self.key)?;
self.pod_id.fmt(f)?;
write!(f, "[")?;
self.key.fmt(f)?;
write!(f, "]")?;
Ok(())
}
}