mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit 650f1260fae442b184eb9ac3fa715df5726c1ec6
parent ba9c91f3c634cd3aa3691b5360aeb6e6eb269235
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Sat,  3 Apr 2021 21:58:48 +0200

resolve some clippy warnings

Diffstat:
Msrc/mail.rs | 3+--
Msrc/main.rs | 4++--
2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/mail.rs b/src/mail.rs @@ -1,7 +1,6 @@ use askama::Template; use tide::Request; -use std::borrow::Cow; use std::fs; use mailparse::{parse_mail, MailHeaderMap, ParsedMail}; @@ -28,7 +27,7 @@ impl Email { } /* This function handles a lot */ pub async fn list_threads(req: Request<()>) -> tide::Result { - let mut mail_files = fs::read_dir("./mail")?; + let mail_files = fs::read_dir("./mail")?; let mut result = vec![]; for mail_file in mail_files { let path = mail_file?.path(); diff --git a/src/main.rs b/src/main.rs @@ -76,7 +76,7 @@ Report bugs at https://todo.sr.ht/~aw/mygit static CONFIG: Lazy<Config> = Lazy::new(args); // so we only have to load this once to reduce startup time for syntax highlighting -static SYNTAXES: Lazy<SyntaxSet> = Lazy::new(|| SyntaxSet::load_defaults_newlines()); +static SYNTAXES: Lazy<SyntaxSet> = Lazy::new(SyntaxSet::load_defaults_newlines); fn args() -> Config { // TODO cli @@ -401,7 +401,7 @@ impl RepoCommitTemplate<'_> { c @ ' ' | c @ '+' | c @ '-' | c @ '=' | c @ '<' | c @ '>' => { buf.push(c) } - 'B' | _ => unreachable!(), + _ => unreachable!(), } buf.push_str(content); true