diff --git a/server/src/main.rs b/server/src/main.rs index 3d206df..59edf2f 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -97,7 +97,7 @@ async fn main() -> Result<()> { .route("/:code", get(|| async { INDEX_PAGE })) .nest("/static", root_service) .route( - &format!("{}{}", API_ENDPOINT.to_string(), "/:code"), + &format!("{}{}", API_ENDPOINT, "/:code"), get(paste::).delete(delete::), ) .layer(AddExtensionLayer::new(db)) diff --git a/web/src/main.rs b/web/src/main.rs index 801fbe0..31649a0 100644 --- a/web/src/main.rs +++ b/web/src/main.rs @@ -94,9 +94,8 @@ fn main() { error!("Key is missing in url; bailing."); render_message("Invalid paste link: Missing metadata.".into()); return; - } else { - fragment } + fragment } else { error!("Key is missing in url; bailing."); render_message("Invalid paste link: Missing metadata.".into()); @@ -107,7 +106,7 @@ fn main() { Ok(partial_parsed_url) => partial_parsed_url, Err(e) => { error!("Failed to parse text fragment; bailing."); - render_message(format!("Invalid paste link: {}", e.to_string()).into()); + render_message(format!("Invalid paste link: {}", e).into()); return; } };