mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 00:01:34 +11:00
Add missing default implementations
This commit is contained in:
parent
b5c97afe61
commit
941eb4ade1
|
@ -52,6 +52,12 @@ impl RandomNumberGenerator {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for RandomNumberGenerator {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
static GLOBAL_RNG: Mutex<RefCell<RandomNumberGenerator>> =
|
||||
Mutex::new(RefCell::new(RandomNumberGenerator::new()));
|
||||
|
||||
|
|
|
@ -60,6 +60,12 @@ impl RawMutex {
|
|||
unsafe impl Send for RawMutex {}
|
||||
unsafe impl Sync for RawMutex {}
|
||||
|
||||
impl Default for RawMutex {
|
||||
fn default() -> Self {
|
||||
Self::new()
|
||||
}
|
||||
}
|
||||
|
||||
/// A guard representing an active lock on an [`RawMutex`].
|
||||
pub struct RawMutexGuard<'a>(&'a RawMutex);
|
||||
impl<'a> Drop for RawMutexGuard<'a> {
|
||||
|
|
Loading…
Reference in a new issue