This commit is contained in:
Edward Shen 2022-01-11 23:50:07 -08:00
parent 1fca1c51e4
commit 4c7ae4feb2
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -89,13 +89,12 @@ fn main() {
}; };
let (key, needs_pw) = { let (key, needs_pw) = {
let fragment = match url.split_once('#').map(|(_, fragment)| fragment) { let fragment = if let Some(fragment) = url.split_once('#').map(|(_, fragment)| fragment) {
Some(fragment) => fragment, fragment
None => { } else {
error!("Key is missing in url; bailing."); error!("Key is missing in url; bailing.");
render_message("Invalid paste link: Missing decryption key.".into()); render_message("Invalid paste link: Missing decryption key.".into());
return; return;
}
}; };
let partial_parsed_url = match PartialParsedUrl::try_from(fragment) { let partial_parsed_url = match PartialParsedUrl::try_from(fragment) {