mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
lint: fix clippy::single_match
This commit is contained in:
parent
a46bd4ebee
commit
4d27f3f5b9
2 changed files with 14 additions and 23 deletions
|
@ -529,21 +529,15 @@ impl Database for Filesystem {
|
|||
let expected = diff_paths(&self.fingerprint_to_path_published(primary_fpr),
|
||||
link_fpr.parent().unwrap()).unwrap();
|
||||
|
||||
match read_link(&link_fpr) {
|
||||
Ok(target) => {
|
||||
if target == expected {
|
||||
remove_file(&link_fpr)?;
|
||||
}
|
||||
if let Ok(target) = read_link(&link_fpr) {
|
||||
if target == expected {
|
||||
remove_file(&link_fpr)?;
|
||||
}
|
||||
Err(_) => {}
|
||||
}
|
||||
match read_link(&link_keyid) {
|
||||
Ok(target) => {
|
||||
if target == expected {
|
||||
remove_file(link_keyid)?;
|
||||
}
|
||||
if let Ok(target) = read_link(&link_keyid) {
|
||||
if target == expected {
|
||||
remove_file(link_keyid)?;
|
||||
}
|
||||
Err(_) => {}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
@ -346,17 +346,14 @@ pub async fn process_post_form(
|
|||
not valid"))
|
||||
})?;
|
||||
|
||||
match name.to_string().as_str() {
|
||||
"keytext" => {
|
||||
return Ok(vks::process_key(
|
||||
db,
|
||||
i18n,
|
||||
tokens_stateless,
|
||||
rate_limiter,
|
||||
Cursor::new(decoded_value.as_bytes())
|
||||
));
|
||||
}
|
||||
_ => { /* skip */ }
|
||||
if name.to_string().as_str() == "keytext" {
|
||||
return Ok(vks::process_key(
|
||||
db,
|
||||
i18n,
|
||||
tokens_stateless,
|
||||
rate_limiter,
|
||||
Cursor::new(decoded_value.as_bytes())
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue