chore: Fix clippy warnings
This commit is contained in:
parent
503324fe5c
commit
0a0e3e1ac3
2 changed files with 2 additions and 5 deletions
|
@ -23,9 +23,6 @@ impl ShareFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_image(&self) -> bool {
|
pub fn is_image(&self) -> bool {
|
||||||
match self {
|
matches!(self, ShareFile::Image(_))
|
||||||
ShareFile::Image(_) => true,
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ pub trait TemplateRenderer {
|
||||||
impl TemplateRenderer for Tera {
|
impl TemplateRenderer for Tera {
|
||||||
fn response(&self, name: &str, context: tera::Context) -> Result<Html<String>, StatusCode> {
|
fn response(&self, name: &str, context: tera::Context) -> Result<Html<String>, StatusCode> {
|
||||||
let result = self.render(name, &context);
|
let result = self.render(name, &context);
|
||||||
result.map(|rendered| Html(rendered)).map_err(|e| {
|
result.map(Html).map_err(|e| {
|
||||||
tracing::error!("failed to render template {:?}", e);
|
tracing::error!("failed to render template {:?}", e);
|
||||||
StatusCode::INTERNAL_SERVER_ERROR
|
StatusCode::INTERNAL_SERVER_ERROR
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue