forked from M-Labs/zynq-rs
libcortex_a9/semaphore: mark new as const fn
This commit is contained in:
parent
a73df780d0
commit
157439bc88
|
@ -12,7 +12,7 @@ pub struct Semaphore {
|
|||
}
|
||||
|
||||
impl Semaphore {
|
||||
pub fn new(value: i32, max: i32) -> Self {
|
||||
pub const fn new(value: i32, max: i32) -> Self {
|
||||
Semaphore { value: AtomicI32::new(value), max}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue