Mark methods as unstable to prevent unused warnings (#3409)

This commit is contained in:
Dániel Buga 2025-04-23 10:53:01 +02:00 committed by GitHub
parent 04b71139be
commit ab73f43d7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -187,6 +187,7 @@ impl FsmTimeout {
///
/// The meaning of the value and the allowed range of values is different
/// for different chips.
#[instability::unstable]
pub const fn new_const<const VALUE: u8>() -> Self {
const {
core::assert!(VALUE <= Self::FSM_TIMEOUT_MAX, "Invalid timeout value");
@ -198,6 +199,7 @@ impl FsmTimeout {
///
/// The meaning of the value and the allowed range of values is different
/// for different chips.
#[instability::unstable]
pub fn new(value: u8) -> Result<Self, ConfigError> {
if value > Self::FSM_TIMEOUT_MAX {
return Err(ConfigError::TimeoutInvalid);