Skip to content

Commit

Permalink
Clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
swenson committed Feb 3, 2025
1 parent afcecc1 commit 73fbceb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
6 changes: 2 additions & 4 deletions dpe/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ fn main() {
let max_handles_str = format!("pub const MAX_HANDLES: usize = {};", arbitrary_max_handles);

let dest_path = PathBuf::from(&dest_path);
if dest_path.exists() {
if std::fs::read_to_string(&dest_path).unwrap_or_default() != max_handles_str {
std::fs::write(&dest_path, max_handles_str).unwrap();
}
if dest_path.exists() && std::fs::read_to_string(&dest_path).unwrap_or_default() != max_handles_str {
std::fs::write(&dest_path, max_handles_str).unwrap();
}
println!("cargo:rerun-if-changed={}", dest_path.display());
}
5 changes: 1 addition & 4 deletions dpe/src/x509.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2994,10 +2994,7 @@ pub(crate) mod tests {
_ => (),
}

match cert.get_extension_unique(&oid!(2.5.29 .35)) {
Err(_) => panic!("multiple authority key identifier extensions found"),
_ => (),
}
if let Err(_) = cert.get_extension_unique(&oid!(2.5.29 .35)) { panic!("multiple authority key identifier extensions found") }

match cert.subject_alternative_name() {
Ok(Some(ext)) => {
Expand Down

0 comments on commit 73fbceb

Please sign in to comment.