From e8fac0f0c8c9b48e3933c6f4a9e607a99cc97cf8 Mon Sep 17 00:00:00 2001 From: ellotheth Date: Thu, 17 Aug 2023 22:09:05 +0200 Subject: [PATCH] clippy fixes (i don't know rust, things seem to still work?) --- build.rs | 2 +- src/routes/submit.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.rs b/build.rs index 85070ac..c5c0c3b 100644 --- a/build.rs +++ b/build.rs @@ -1,7 +1,7 @@ use std::process::Command; fn main() { let output = Command::new("git") - .args(&["rev-parse", "HEAD"]) + .args(["rev-parse", "HEAD"]) .output() .unwrap(); let git_hash = String::from_utf8(output.stdout).unwrap(); diff --git a/src/routes/submit.rs b/src/routes/submit.rs index 6ffd84f..0422d87 100644 --- a/src/routes/submit.rs +++ b/src/routes/submit.rs @@ -19,7 +19,7 @@ pub async fn submit(paste: Form) -> Redirect { let content = &paste.content; let ext = &paste.ext; - fs::write(&filepath, content).expect("Unable to write to the file"); + fs::write(filepath, content).expect("Unable to write to the file"); Redirect::to(format!("/p/{id}.{ext}", id = id, ext = ext)) }