-
Notifications
You must be signed in to change notification settings - Fork 15
Fix generator usage #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -298,7 +298,9 @@ | |||
//! #[macro_use(await)] | ||||
//! extern crate nb; | ||||
//! | ||||
//! use std::ops::Generator; | ||||
//! extern crate core; | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It does not compile otherwise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Superweird. Probably needs a thourough overhaul. |
||||
//! use core::ops::Generator; | ||||
//! use core::pin::Pin; | ||||
//! | ||||
//! use hal::{Led, Serial, Timer}; | ||||
//! | ||||
|
@@ -327,10 +329,12 @@ | |||
//! } | ||||
//! }; | ||||
//! | ||||
//! let blinky = Pin::new(&mut blinky); | ||||
//! let loopback = Pin::new(&mut loopback); | ||||
//! // Event loop | ||||
//! loop { | ||||
//! blinky.resume(); | ||||
//! loopback.resume(); | ||||
//! blinky.resume(()); | ||||
//! loopback.resume(()); | ||||
//! # break | ||||
//! } | ||||
//! } | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should modernize this, too, while we are at it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Rust 2018 it does not build due to await being a reserved keyword.