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 {
|
||||
match self {
|
||||
ShareFile::Image(_) => true,
|
||||
_ => false,
|
||||
}
|
||||
matches!(self, ShareFile::Image(_))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ pub trait TemplateRenderer {
|
|||
impl TemplateRenderer for Tera {
|
||||
fn response(&self, name: &str, context: tera::Context) -> Result<Html<String>, StatusCode> {
|
||||
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);
|
||||
StatusCode::INTERNAL_SERVER_ERROR
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue