Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Last active December 20, 2015 13:39
Show Gist options
  • Save olsonjeffery/6140063 to your computer and use it in GitHub Desktop.
Save olsonjeffery/6140063 to your computer and use it in GitHub Desktop.
/// The Promise type. Can provide the value of a Future
pub struct Promise<A> (ChanOne<A>);
impl<A:Send> Promise<A> {
pub fn fulfill(&mut self, v: A) {
(*self).send(v);
}
}
/home/jeff/src/rust/src/libstd/unstable/future.rs:63:8: 63:16 error: cannot move out of dereference of & pointer
/home/jeff/src/rust/src/libstd/unstable/future.rs:63 (*self).send(v);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment