Skip to content

Commit 7ca6b17

Browse files
beepster4096RalfJung
authored andcommitted
use Default derive for InitOnceStatus
1 parent 22d06f9 commit 7ca6b17

File tree

1 file changed

+2
-7
lines changed
  • src/tools/miri/src/concurrency

1 file changed

+2
-7
lines changed

src/tools/miri/src/concurrency/sync.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,20 +166,15 @@ impl<'mir, 'tcx> std::fmt::Debug for InitOnceWaiter<'mir, 'tcx> {
166166
}
167167
}
168168

169-
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
169+
#[derive(Default, Debug, Copy, Clone, PartialEq, Eq,)]
170170
/// The current status of a one time initialization.
171171
pub enum InitOnceStatus {
172+
#[default]
172173
Uninitialized,
173174
Begun,
174175
Complete,
175176
}
176177

177-
impl Default for InitOnceStatus {
178-
fn default() -> Self {
179-
Self::Uninitialized
180-
}
181-
}
182-
183178
/// The one time initialization state.
184179
#[derive(Default, Debug)]
185180
struct InitOnce<'mir, 'tcx> {

0 commit comments

Comments
 (0)