Clippy
This commit is contained in:
parent
c2bdd089e9
commit
bccf84cfc1
2 changed files with 3 additions and 4 deletions
|
@ -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::<SHORT_CODE_SIZE>).delete(delete::<SHORT_CODE_SIZE>),
|
||||
)
|
||||
.layer(AddExtensionLayer::new(db))
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue