Story can now be Displayed.

This commit is contained in:
2025-09-07 17:58:58 -04:00
parent 80e0fba845
commit 81db64f82e
2 changed files with 15 additions and 1 deletions

View File

@ -53,3 +53,17 @@ pub struct Tale
#[serde(flatten)]
pub story: Story
}
impl std::fmt::Display for Story
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result
{
match self
{
Story::File(path) => { write!(f, "{}", path.display()) }
Story::Html(content) => { write!(f, "{}", content) }
}
}
}