]> git.lizzy.rs Git - rust.git/blobdiff - src/libstd/sync/condvar.rs
Implement `Default` for more types in the standard library
[rust.git] / src / libstd / sync / condvar.rs
index 64468be396f344f2f875fc079aacac2dfbbe5de5..57932f0379683dd6bc63519a9693912a8a6f678e 100644 (file)
@@ -220,6 +220,13 @@ pub fn notify_one(&self) { unsafe { self.inner.inner.notify_one() } }
     pub fn notify_all(&self) { unsafe { self.inner.inner.notify_all() } }
 }
 
+#[stable(feature = "condvar_default", since = "1.9.0")]
+impl Default for Condvar {
+    fn default() -> Condvar {
+        Condvar::new()
+    }
+}
+
 #[stable(feature = "rust1", since = "1.0.0")]
 impl Drop for Condvar {
     fn drop(&mut self) {