Skip to content

Commit

Permalink
Volatile test initialisers can be const.
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Jun 12, 2024
1 parent 6509531 commit c2f6cde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/volatile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub struct ReadOnly<T: Copy>(T);

impl<T: Copy> ReadOnly<T> {
/// Construct a new instance for testing.
pub fn new(value: T) -> Self {
pub const fn new(value: T) -> Self {
Self(value)
}
}
Expand All @@ -22,7 +22,7 @@ pub struct Volatile<T: Copy>(T);

impl<T: Copy> Volatile<T> {
/// Construct a new instance for testing.
pub fn new(value: T) -> Self {
pub const fn new(value: T) -> Self {
Self(value)
}
}
Expand Down

0 comments on commit c2f6cde

Please sign in to comment.