Story can now be Displayed.
This commit is contained in:
@ -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) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user