mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 23:02:30 +00:00
Merge #948
948: (embassy-stm32): make `State::new()` const, consistent with others r=Dirbaio a=FrozenDroid Co-authored-by: Vincent Stakenburg <v.stakenburg@sinewave.nl>
This commit is contained in:
commit
9794bc59cc
@ -29,7 +29,7 @@ use super::*;
|
||||
|
||||
pub struct State<'d, T: Instance, const TX: usize, const RX: usize>(StateStorage<Inner<'d, T, TX, RX>>);
|
||||
impl<'d, T: Instance, const TX: usize, const RX: usize> State<'d, T, TX, RX> {
|
||||
pub fn new() -> Self {
|
||||
pub const fn new() -> Self {
|
||||
Self(StateStorage::new())
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ use super::*;
|
||||
|
||||
pub struct State<'d, T: Instance, const TX: usize, const RX: usize>(StateStorage<Inner<'d, T, TX, RX>>);
|
||||
impl<'d, T: Instance, const TX: usize, const RX: usize> State<'d, T, TX, RX> {
|
||||
pub fn new() -> Self {
|
||||
pub const fn new() -> Self {
|
||||
Self(StateStorage::new())
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ use super::*;
|
||||
|
||||
pub struct State<'d, T: BasicInstance>(StateStorage<StateInner<'d, T>>);
|
||||
impl<'d, T: BasicInstance> State<'d, T> {
|
||||
pub fn new() -> Self {
|
||||
pub const fn new() -> Self {
|
||||
Self(StateStorage::new())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user