Skip to content

Commit

Permalink
Updated for removal of NoCopy marker in nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
mokus0 committed Aug 16, 2015
1 parent f2425e2 commit 5a1bc63
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/os/cond_var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub use os::cond_var::internal::{CondVar, COND_VAR_INIT};
mod internal {
use core::option::{None, Some};
use core::ty::Unsafe;
use core::marker;
use core::marker::Sync;

use hal::cortex_m3::sched::NoInterrupts;
Expand Down Expand Up @@ -92,7 +91,6 @@ mod internal {

#[cfg(not(multitasking))]
mod internal {
use core::marker;
use core::marker::Sync;
use core::cell::UnsafeCell;

Expand All @@ -101,21 +99,18 @@ mod internal {
/// A condition variable
pub struct CondVar {
waiting: UnsafeCell<bool>,
nocopy: marker::NoCopy
}

/// Static initializer
pub const COND_VAR_INIT: CondVar = CondVar {
waiting: UnsafeCell { value: false },
nocopy: marker::NoCopy,
waiting: UnsafeCell::new(false),
};

impl CondVar {
/// Create a new condition variable
pub fn new() -> CondVar {
CondVar {
waiting: UnsafeCell::new(false),
nocopy: marker::NoCopy,
}
}

Expand Down

0 comments on commit 5a1bc63

Please sign in to comment.