Skip to content

Commit 3216efd

Browse files
committed
Implement Default for SpinLock<SelfContainedContext>
This is a bit silly since we cannot implement `Default` for `SpinLock<u64>` but clippy is complaining so throw it in.
1 parent 155c7c1 commit 3216efd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/context/spinlock.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ impl SpinLock<SelfContainedContext> {
4343
}
4444
}
4545

46+
impl Default for SpinLock<SelfContainedContext> {
47+
fn default() -> Self { Self::new() }
48+
}
49+
4650
#[cfg(test)]
4751
impl SpinLock<u64> {
4852
pub const fn new(v: u64) -> Self {

0 commit comments

Comments
 (0)