libcortex_a9/semaphore: mark new as const fn

This commit is contained in:
pca006132 2020-09-02 09:51:52 +08:00
parent a73df780d0
commit 157439bc88
1 changed files with 1 additions and 1 deletions

View File

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