mirror of
https://git.proxmox.com/git/proxmox
synced 2025-04-30 02:38:03 +00:00
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:
parent
efc8556c27
commit
ab2d5c9777
@ -38,6 +38,12 @@ pub enum AccountStatus {
|
|||||||
Revoked,
|
Revoked,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for AccountStatus {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl AccountStatus {
|
impl AccountStatus {
|
||||||
/// Create a new instance with state New.
|
/// Create a new instance with state New.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
@ -237,6 +237,12 @@ pub struct Keyring {
|
|||||||
public_keys: Vec<VerificationKey>,
|
public_keys: Vec<VerificationKey>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Keyring {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::new()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Keyring {
|
impl Keyring {
|
||||||
pub fn generate_new_rsa() -> Result<Self, Error> {
|
pub fn generate_new_rsa() -> Result<Self, Error> {
|
||||||
PrivateKey::generate_rsa().map(Self::with_private_key)
|
PrivateKey::generate_rsa().map(Self::with_private_key)
|
||||||
|
Loading…
Reference in New Issue
Block a user