Skip to content

Commit c3b151a

Browse files
committed
Merge #860: Implement Default for SpinLock<SelfContainedContext>
3216efd Implement Default for SpinLock<SelfContainedContext> (Tobin C. Harding) Pull request description: This is a bit silly since we cannot implement `Default` for `SpinLock<u64>` but clippy is complaining so throw it in. ACKs for top commit: apoelstra: ACK 3216efd; successfully ran local tests; sure Tree-SHA512: e3786d80eaea60a4f547145fd76c77966fbbc68b7b111044e6db38f76ba1700baea6924a282b52cb86a16829489f119e279c0b4abaf145cb00bc8cc6b5ae5b11
2 parents 155c7c1 + 3216efd commit c3b151a

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)