From 8b16365c2dd9f09efe0541a6e0e82c2ba18bed38 Mon Sep 17 00:00:00 2001 From: Kirill Mikhailov <62840029+playfulFence@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:36:54 +0100 Subject: [PATCH] Make `ConfigError` enum follow naming convention (#2855) * Make `ConfigError` follow naming convention * changelog entry * !(changelog entry) --- esp-hal/src/i2c/master/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esp-hal/src/i2c/master/mod.rs b/esp-hal/src/i2c/master/mod.rs index b5de15d0cc..db9803720c 100644 --- a/esp-hal/src/i2c/master/mod.rs +++ b/esp-hal/src/i2c/master/mod.rs @@ -132,7 +132,7 @@ impl core::fmt::Display for Error { #[non_exhaustive] pub enum ConfigError { /// Provided bus frequency is invalid for the current configuration. - InvalidFrequency, + FrequencyInvalid, } impl core::error::Error for ConfigError {} @@ -140,7 +140,7 @@ impl core::error::Error for ConfigError {} impl core::fmt::Display for ConfigError { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { match self { - ConfigError::InvalidFrequency => write!( + ConfigError::FrequencyInvalid => write!( f, "Provided bus frequency is invalid for the current configuration" ), @@ -932,7 +932,7 @@ fn configure_clock( #[cfg(not(esp32))] let scl_wait_high_period = scl_wait_high_period .try_into() - .map_err(|_| ConfigError::InvalidFrequency)?; + .map_err(|_| ConfigError::FrequencyInvalid)?; register_block.scl_high_period().write(|w| { #[cfg(not(esp32))] // ESP32 does not have a wait_high field