]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys_common/condvar.rs
Rollup merge of #98334 - JohnTitor:issue-73727, r=compiler-errors
[rust.git] / library / std / src / sys_common / condvar.rs
index 4e55340d6aa5dd51a36da22e8479292406aa527c..f3ac1061b8935045ab1b01ca920dd324c4e06999 100644 (file)
@@ -14,10 +14,9 @@ pub struct Condvar {
 
 impl Condvar {
     /// Creates a new condition variable for use.
-    pub fn new() -> Self {
-        let mut c = imp::MovableCondvar::from(imp::Condvar::new());
-        unsafe { c.init() };
-        Self { inner: c, check: CondvarCheck::new() }
+    #[inline]
+    pub const fn new() -> Self {
+        Self { inner: imp::MovableCondvar::new(), check: CondvarCheck::new() }
     }
 
     /// Signals one waiter on this condition variable to wake up.