src: cargo clippy and fmt the project
Signed-off-by: Gunwant Jain <mail@wantguns.dev>
This commit is contained in:
@@ -14,7 +14,7 @@ pub async fn pretty_retrieve_ext(
|
||||
let id = id_ext.get_fname();
|
||||
let ext = id_ext.get_ext();
|
||||
|
||||
let filepath = Path::new(&get_upload_dir()).join(format!("{id}", id = id));
|
||||
let filepath = Path::new(&get_upload_dir()).join(id.to_string());
|
||||
|
||||
let contents = get_pretty_body(&filepath, &ext.to_string());
|
||||
|
||||
|
||||
@@ -16,6 +16,5 @@ pub async fn retrieve(id: PasteId<'_>) -> Option<File> {
|
||||
pub async fn retrieve_ext(id_ext: PasteIdSyntax<'_>) -> Option<File> {
|
||||
// let filename = format!("upload/{id}", id = id_ext.get_fname());
|
||||
|
||||
File::open(get_upload_dir().join(format!("{id}", id = id_ext.get_fname())))
|
||||
.ok()
|
||||
File::open(get_upload_dir().join(id_ext.get_fname().to_string())).ok()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user