acme/auth-api: add Default for types with un-parameterized new()

this fixes a clippy lint for types that have a `new()` function that
has no parameters [1]. this should allow using these types with
functions such as `unwrap_or_default()`.

[1]:
https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
This commit is contained in:
Shannon Sterz 2025-03-06 13:43:40 +01:00 committed by Wolfgang Bumiller
parent efc8556c27
commit ab2d5c9777
2 changed files with 12 additions and 0 deletions

View File

@ -38,6 +38,12 @@ pub enum AccountStatus {
Revoked,
}
impl Default for AccountStatus {
fn default() -> Self {
Self::new()
}
}
impl AccountStatus {
/// Create a new instance with state New.
#[inline]

View File

@ -237,6 +237,12 @@ pub struct Keyring {
public_keys: Vec<VerificationKey>,
}
impl Default for Keyring {
fn default() -> Self {
Self::new()
}
}
impl Keyring {
pub fn generate_new_rsa() -> Result<Self, Error> {
PrivateKey::generate_rsa().map(Self::with_private_key)