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 }))
|
.route("/:code", get(|| async { INDEX_PAGE }))
|
||||||
.nest("/static", root_service)
|
.nest("/static", root_service)
|
||||||
.route(
|
.route(
|
||||||
&format!("{}{}", API_ENDPOINT.to_string(), "/:code"),
|
&format!("{}{}", API_ENDPOINT, "/:code"),
|
||||||
get(paste::<SHORT_CODE_SIZE>).delete(delete::<SHORT_CODE_SIZE>),
|
get(paste::<SHORT_CODE_SIZE>).delete(delete::<SHORT_CODE_SIZE>),
|
||||||
)
|
)
|
||||||
.layer(AddExtensionLayer::new(db))
|
.layer(AddExtensionLayer::new(db))
|
||||||
|
|
|
@ -94,9 +94,8 @@ fn main() {
|
||||||
error!("Key is missing in url; bailing.");
|
error!("Key is missing in url; bailing.");
|
||||||
render_message("Invalid paste link: Missing metadata.".into());
|
render_message("Invalid paste link: Missing metadata.".into());
|
||||||
return;
|
return;
|
||||||
} else {
|
|
||||||
fragment
|
|
||||||
}
|
}
|
||||||
|
fragment
|
||||||
} else {
|
} else {
|
||||||
error!("Key is missing in url; bailing.");
|
error!("Key is missing in url; bailing.");
|
||||||
render_message("Invalid paste link: Missing metadata.".into());
|
render_message("Invalid paste link: Missing metadata.".into());
|
||||||
|
@ -107,7 +106,7 @@ fn main() {
|
||||||
Ok(partial_parsed_url) => partial_parsed_url,
|
Ok(partial_parsed_url) => partial_parsed_url,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to parse text fragment; bailing.");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue