mirror of
https://github.com/zyllian/webdog.git
synced 2025-05-10 02:26:42 -07:00
replace anyhow with eyre
This commit is contained in:
parent
00b5567769
commit
27bd18beea
12 changed files with 172 additions and 77 deletions
|
@ -5,7 +5,7 @@ use crate::{blog::BlogPostMetadata, builder::SiteBuilder, resource::ResourceTemp
|
|||
|
||||
#[derive(Debug)]
|
||||
pub enum Extra {
|
||||
HtmlModification(fn(page: String, builder: &SiteBuilder) -> anyhow::Result<String>),
|
||||
HtmlModification(fn(page: String, builder: &SiteBuilder) -> eyre::Result<String>),
|
||||
}
|
||||
|
||||
/// Gets the extra for the given value.
|
||||
|
@ -17,7 +17,7 @@ pub fn get_extra(extra: &str) -> Option<Extra> {
|
|||
}
|
||||
|
||||
/// Extra to add a sidebar to the index page with recent blog posts on it.
|
||||
fn index(page: String, builder: &SiteBuilder) -> anyhow::Result<String> {
|
||||
fn index(page: String, builder: &SiteBuilder) -> eyre::Result<String> {
|
||||
#[derive(Debug, Serialize)]
|
||||
struct SidebarTemplateData<'r> {
|
||||
// resources: Vec<&'r ResourceMetadata<BlogPostMetadata>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue