From 157439bc88cbb18bb40009428acf1fdee800e32e Mon Sep 17 00:00:00 2001 From: pca006132 Date: Wed, 2 Sep 2020 09:51:52 +0800 Subject: [PATCH] libcortex_a9/semaphore: mark new as const fn --- libcortex_a9/src/semaphore.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcortex_a9/src/semaphore.rs b/libcortex_a9/src/semaphore.rs index 67e6ebb..a188499 100644 --- a/libcortex_a9/src/semaphore.rs +++ b/libcortex_a9/src/semaphore.rs @@ -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} }