clippy fixes
(i don't know rust, things seem to still work?)
This commit is contained in:
2
build.rs
2
build.rs
@@ -1,7 +1,7 @@
|
|||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
fn main() {
|
fn main() {
|
||||||
let output = Command::new("git")
|
let output = Command::new("git")
|
||||||
.args(&["rev-parse", "HEAD"])
|
.args(["rev-parse", "HEAD"])
|
||||||
.output()
|
.output()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let git_hash = String::from_utf8(output.stdout).unwrap();
|
let git_hash = String::from_utf8(output.stdout).unwrap();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pub async fn submit(paste: Form<PasteIdForm>) -> Redirect {
|
|||||||
let content = &paste.content;
|
let content = &paste.content;
|
||||||
let ext = &paste.ext;
|
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))
|
Redirect::to(format!("/p/{id}.{ext}", id = id, ext = ext))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user