mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 06:40:47 +00:00
Mark methods as unstable to prevent unused warnings (#3409)
This commit is contained in:
parent
04b71139be
commit
ab73f43d7d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user