mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 03:31:45 +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:
@@ -2,20 +2,15 @@ use self::BlsSetting::*;
|
||||
use crate::error::Error;
|
||||
use serde_repr::Deserialize_repr;
|
||||
|
||||
#[derive(Deserialize_repr, Debug, Clone, Copy)]
|
||||
#[derive(Deserialize_repr, Debug, Clone, Copy, Default)]
|
||||
#[repr(u8)]
|
||||
pub enum BlsSetting {
|
||||
#[default]
|
||||
Flexible = 0,
|
||||
Required = 1,
|
||||
Ignored = 2,
|
||||
}
|
||||
|
||||
impl Default for BlsSetting {
|
||||
fn default() -> Self {
|
||||
Flexible
|
||||
}
|
||||
}
|
||||
|
||||
impl BlsSetting {
|
||||
/// Check the BLS setting and skip the test if it isn't compatible with the crypto config.
|
||||
pub fn check(self) -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user