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:
bors[bot] 2022-09-15 11:14:24 +00:00 committed by GitHub
commit 9794bc59cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -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())
}
}

View File

@ -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())
}
}

View File

@ -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())
}
}