Allow clippy to break API, ignore a few initialism errors (#2840)

This commit is contained in:
Dániel Buga 2025-01-03 15:13:07 +01:00 committed by GitHub
parent 551386216e
commit 19eb7728bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
31 changed files with 66 additions and 23 deletions

1
esp-alloc/.clippy.toml Normal file
View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

1
esp-hal/.clippy.toml Normal file
View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

View File

@ -53,6 +53,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- The `ExtU64` and `RateExtU32` traits have been added to `esp_hal::time` (#2845) - The `ExtU64` and `RateExtU32` traits have been added to `esp_hal::time` (#2845)
- `adc::{AdcCalSource, Attenuation, Resolution}` now implement `Hash` and `defmt::Format` (#2840)
- `rtc_cntl::{RtcFastClock, RtcSlowClock, RtcCalSel}` now implement `PartialEq`, `Eq`, `Hash` and `defmt::Format` (#2840)
### Changed ### Changed
- Bump MSRV to 1.83 (#2615) - Bump MSRV to 1.83 (#2615)

View File

@ -7,7 +7,9 @@ use crate::{
pub(super) const NUM_ATTENS: usize = 10; pub(super) const NUM_ATTENS: usize = 10;
/// The sampling/readout resolution of the ADC. /// The sampling/readout resolution of the ADC.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Resolution { pub enum Resolution {
/// 9-bit resolution /// 9-bit resolution
Resolution9Bit = 0b00, Resolution9Bit = 0b00,

View File

@ -70,7 +70,9 @@ mod implementation;
/// The effective measurement range for a given attenuation is dependent on the /// The effective measurement range for a given attenuation is dependent on the
/// device being targeted. Please refer to "ADC Characteristics" section of your /// device being targeted. Please refer to "ADC Characteristics" section of your
/// device's datasheet for more information. /// device's datasheet for more information.
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Attenuation { pub enum Attenuation {
/// 0dB attenuation /// 0dB attenuation
Attenuation0dB = 0b00, Attenuation0dB = 0b00,
@ -86,7 +88,8 @@ pub enum Attenuation {
/// Calibration source of the ADC. /// Calibration source of the ADC.
#[cfg(not(esp32))] #[cfg(not(esp32))]
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub enum AdcCalSource { pub enum AdcCalSource {
/// Use Ground as the calibration source /// Use Ground as the calibration source
Gnd, Gnd,

View File

@ -101,7 +101,9 @@ cfg_if::cfg_if! {
} }
/// The sampling/readout resolution of the ADC. /// The sampling/readout resolution of the ADC.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Resolution { pub enum Resolution {
/// 12-bit resolution /// 12-bit resolution
#[default] #[default]

View File

@ -73,7 +73,9 @@ cfg_if::cfg_if! {
} }
/// The sampling/readout resolution of the ADC. /// The sampling/readout resolution of the ADC.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Resolution { pub enum Resolution {
/// 13-bit resolution /// 13-bit resolution
#[default] #[default]

View File

@ -78,6 +78,11 @@ pub trait Clock {
/// CPU clock speed /// CPU clock speed
#[derive(Debug, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(
clippy::enum_variant_names,
reason = "MHz suffix indicates physical unit."
)]
/// FIXME: Remove Clock prefix once we can agree on a convention.
pub enum CpuClock { pub enum CpuClock {
/// 80MHz CPU clock /// 80MHz CPU clock
#[cfg(not(esp32h2))] #[cfg(not(esp32h2))]

View File

@ -67,6 +67,7 @@ pub enum Error {
/// user. It can also deliver to other peripherals. /// user. It can also deliver to other peripherals.
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum HmacPurpose { pub enum HmacPurpose {
/// HMAC is used to re-enable JTAG after soft-disabling it. /// HMAC is used to re-enable JTAG after soft-disabling it.
ToJtag = 6, ToJtag = 6,

View File

@ -143,6 +143,7 @@ impl AcceptedWord for i32 {}
/// I2S Error /// I2S Error
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Error { pub enum Error {
/// An unspecified or unknown error occurred during an I2S operation. /// An unspecified or unknown error occurred during an I2S operation.
Unknown, Unknown,

View File

@ -68,6 +68,7 @@ pub mod config {
/// Number of bits reserved for duty cycle adjustment /// Number of bits reserved for duty cycle adjustment
#[derive(PartialEq, Eq, Copy, Clone, Debug)] #[derive(PartialEq, Eq, Copy, Clone, Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve before stabilizing this driver
pub enum Duty { pub enum Duty {
/// 1-bit resolution for duty cycle adjustment. /// 1-bit resolution for duty cycle adjustment.
Duty1Bit = 1, Duty1Bit = 1,

View File

@ -21,6 +21,7 @@ use crate::{
/// Input/Output Stream descriptor for each channel /// Input/Output Stream descriptor for each channel
#[derive(Copy, Clone)] #[derive(Copy, Clone)]
#[allow(clippy::upper_case_acronyms, reason = "peripheral is unstable")]
pub enum PWMStream { pub enum PWMStream {
/// PWM Stream A /// PWM Stream A
PWMA, PWMA,

View File

@ -185,6 +185,7 @@ pub enum ParlIoInterrupt {
/// Parallel IO errors /// Parallel IO errors
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Error { pub enum Error {
/// General DMA error /// General DMA error
DmaError(DmaError), DmaError(DmaError),

View File

@ -386,7 +386,7 @@ mod peripheral_macros {
#[derive(Debug)] #[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[non_exhaustive] #[non_exhaustive]
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
/// Represents a virtual peripheral with no associated hardware. /// Represents a virtual peripheral with no associated hardware.
/// ///
/// This struct is generated by the `create_peripheral!` macro when the peripheral /// This struct is generated by the `create_peripheral!` macro when the peripheral

View File

@ -239,6 +239,7 @@ use crate::{
/// Errors /// Errors
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names, reason = "peripheral is unstable")]
pub enum Error { pub enum Error {
/// The desired frequency is impossible to reach /// The desired frequency is impossible to reach
UnreachableTargetFrequency, UnreachableTargetFrequency,

View File

@ -176,7 +176,9 @@ unsafe fn lp_wdt<'a>() -> &'a <LPWR as core::ops::Deref>::Target {
#[cfg(not(any(esp32c6, esp32h2)))] #[cfg(not(any(esp32c6, esp32h2)))]
#[allow(unused)] #[allow(unused)]
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve this
/// RTC SLOW_CLK frequency values /// RTC SLOW_CLK frequency values
pub(crate) enum RtcFastClock { pub(crate) enum RtcFastClock {
/// Main XTAL, divided by 4 /// Main XTAL, divided by 4
@ -199,8 +201,10 @@ impl Clock for RtcFastClock {
} }
#[cfg(not(any(esp32c6, esp32h2)))] #[cfg(not(any(esp32c6, esp32h2)))]
#[derive(Debug, Clone, Copy)]
#[non_exhaustive] #[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve this
/// RTC SLOW_CLK frequency values /// RTC SLOW_CLK frequency values
pub enum RtcSlowClock { pub enum RtcSlowClock {
/// Internal slow RC oscillator /// Internal slow RC oscillator
@ -232,7 +236,9 @@ impl Clock for RtcSlowClock {
#[allow(unused)] #[allow(unused)]
#[cfg(not(any(esp32c6, esp32h2)))] #[cfg(not(any(esp32c6, esp32h2)))]
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve this
/// Clock source to be calibrated using rtc_clk_cal function /// Clock source to be calibrated using rtc_clk_cal function
pub(crate) enum RtcCalSel { pub(crate) enum RtcCalSel {
/// Currently selected RTC SLOW_CLK /// Currently selected RTC SLOW_CLK

View File

@ -119,7 +119,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -311,7 +311,7 @@ pub enum InputSignal {
} }
/// Peripheral output signals for the GPIO mux /// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -63,7 +63,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -104,7 +104,7 @@ pub enum InputSignal {
} }
/// Peripheral output signals for the GPIO mux /// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -65,7 +65,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -115,7 +115,7 @@ pub enum InputSignal {
} }
/// Peripheral output signals for the GPIO mux /// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -65,7 +65,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -170,7 +170,7 @@ pub enum InputSignal {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -63,7 +63,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -149,7 +149,7 @@ pub enum InputSignal {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -126,7 +126,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -213,7 +213,7 @@ pub enum InputSignal {
} }
/// Peripheral output signals for the GPIO mux /// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]

View File

@ -65,7 +65,7 @@ pub(crate) fn gpio_intr_enable(int_enable: bool, nmi_enable: bool) -> u8 {
} }
/// Peripheral input signals for the GPIO mux /// Peripheral input signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] #[doc(hidden)]
@ -228,7 +228,7 @@ pub enum InputSignal {
} }
/// Peripheral output signals for the GPIO mux /// Peripheral output signals for the GPIO mux
#[allow(non_camel_case_types)] #[allow(non_camel_case_types, clippy::upper_case_acronyms)]
#[derive(Debug, PartialEq, Copy, Clone)] #[derive(Debug, PartialEq, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[doc(hidden)] // TODO connection operations are now public on these, we might want to publish #[doc(hidden)] // TODO connection operations are now public on these, we might want to publish

View File

@ -25,6 +25,7 @@ pub enum Error {
/// Error occurred due to a DMA-related issue. /// Error occurred due to a DMA-related issue.
#[cfg(any(doc, feature = "unstable"))] #[cfg(any(doc, feature = "unstable"))]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))] #[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[allow(clippy::enum_variant_names, reason = "DMA is unstable")]
DmaError(DmaError), DmaError(DmaError),
/// Error indicating that the maximum DMA transfer size was exceeded. /// Error indicating that the maximum DMA transfer size was exceeded.
MaxDmaTransferSizeExceeded, MaxDmaTransferSizeExceeded,

View File

@ -277,6 +277,7 @@ pub enum Error {
/// ///
/// This error occurs when the received data does not conform to the /// This error occurs when the received data does not conform to the
/// expected UART frame format. /// expected UART frame format.
#[allow(clippy::enum_variant_names, reason = "Frame error is a common term")]
RxFrameError, RxFrameError,
/// A parity error was detected on the RX line. /// A parity error was detected on the RX line.
@ -284,6 +285,7 @@ pub enum Error {
/// This error occurs when the parity bit in the received data does not /// This error occurs when the parity bit in the received data does not
/// match the expected parity configuration. /// match the expected parity configuration.
/// with the `async` feature. /// with the `async` feature.
#[allow(clippy::enum_variant_names, reason = "Parity error is a common term")]
RxParityError, RxParityError,
} }
@ -369,6 +371,7 @@ pub enum DataBits {
/// either even or odd. /// either even or odd.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve this
pub enum Parity { pub enum Parity {
/// No parity bit is used (most common). /// No parity bit is used (most common).
#[default] #[default]
@ -388,6 +391,7 @@ pub enum Parity {
/// bits. /// bits.
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)] #[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME: resolve this
pub enum StopBits { pub enum StopBits {
/// 1 stop bit. /// 1 stop bit.
#[default] #[default]

1
esp-println/.clippy.toml Normal file
View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

1
esp-storage/.clippy.toml Normal file
View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

1
esp-wifi/.clippy.toml Normal file
View File

@ -0,0 +1 @@
avoid-breaking-exported-api = false

View File

@ -61,6 +61,7 @@ macro_rules! check_error {
#[repr(u32)] #[repr(u32)]
#[derive(Debug)] #[derive(Debug)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME avoid Error suffix, could use better names
pub enum Error { pub enum Error {
/// ESP-NOW is not initialized. /// ESP-NOW is not initialized.
NotInitialized = 12389, NotInitialized = 12389,

View File

@ -158,6 +158,7 @@ use crate::binary::{
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))] #[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Default)] #[derive(Default)]
#[allow(clippy::upper_case_acronyms)] // FIXME
pub enum AuthMethod { pub enum AuthMethod {
/// No authentication (open network). /// No authentication (open network).
None, None,
@ -1089,6 +1090,7 @@ pub enum WifiEvent {
#[repr(i32)] #[repr(i32)]
#[derive(Copy, Clone, Debug, PartialEq, Eq, FromPrimitive)] #[derive(Copy, Clone, Debug, PartialEq, Eq, FromPrimitive)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[allow(clippy::enum_variant_names)] // FIXME remove prefix
pub enum InternalWifiError { pub enum InternalWifiError {
/// Out of memory /// Out of memory
EspErrNoMem = 0x101, EspErrNoMem = 0x101,