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)) }