diff --git a/src/volatile.rs b/src/volatile.rs index b7059d13..84751357 100644 --- a/src/volatile.rs +++ b/src/volatile.rs @@ -5,7 +5,7 @@ pub struct ReadOnly(T); impl ReadOnly { /// Construct a new instance for testing. - pub fn new(value: T) -> Self { + pub const fn new(value: T) -> Self { Self(value) } } @@ -22,7 +22,7 @@ pub struct Volatile(T); impl Volatile { /// Construct a new instance for testing. - pub fn new(value: T) -> Self { + pub const fn new(value: T) -> Self { Self(value) } }