mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Bump the MSRV to 1.62 and using #[derive(Default)] on enums (#3304)
## Issue Addressed N/A ## Proposed Changes Since Rust 1.62, we can use `#[derive(Default)]` on enums. ✨ https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html#default-enum-variants There are no changes to functionality in this PR, just replaced the `Default` trait implementation with `#[derive(Default)]`.
This commit is contained in:
@@ -58,9 +58,10 @@ impl Kdf {
|
||||
}
|
||||
|
||||
/// PRF for use in `pbkdf2`.
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize, Default)]
|
||||
pub enum Prf {
|
||||
#[serde(rename = "hmac-sha256")]
|
||||
#[default]
|
||||
HmacSha256,
|
||||
}
|
||||
|
||||
@@ -73,12 +74,6 @@ impl Prf {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Prf {
|
||||
fn default() -> Self {
|
||||
Prf::HmacSha256
|
||||
}
|
||||
}
|
||||
|
||||
/// Parameters for `pbkdf2` key derivation.
|
||||
#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
|
||||
Reference in New Issue
Block a user