|
237 | 237 | //! must provide the `libstd` in order to be able to use `futures`, which is not
|
238 | 238 | //! the case for many embedded targets.
|
239 | 239 | //!
|
240 |
| -//! ```not_run |
| 240 | +//! ```no_run |
241 | 241 | //! extern crate embedded_hal as hal;
|
242 | 242 | //! extern crate futures;
|
243 | 243 | //!
|
|
257 | 257 | //! /// `futures` version of `CountDown.try_wait`
|
258 | 258 | //! ///
|
259 | 259 | //! /// This returns a future that must be polled to completion
|
260 |
| -//! fn wait<T>(mut timer: T) -> impl Future<Item = T, Error = Infallible> |
| 260 | +//! fn wait<T>(mut timer: T) -> impl Future<Item = T, Error = T::Error> |
261 | 261 | //! where
|
262 | 262 | //! T: hal::timer::CountDown,
|
263 | 263 | //! {
|
|
349 | 349 | //! # use core::convert::Infallible;
|
350 | 350 | //! # pub struct Timer6;
|
351 | 351 | //! # impl ::hal::timer::CountDown for Timer6 {
|
| 352 | +//! # type Error = Infallible; |
352 | 353 | //! # type Time = ();
|
353 | 354 | //! #
|
354 |
| -//! # fn try_start<T>(&mut self, _: T) -> Result<(), Infallible> where T: Into<()> {} |
| 355 | +//! # fn try_start<T>(&mut self, _: T) -> Result<(), Infallible> where T: Into<()> { Ok(()) } |
355 | 356 | //! # fn try_wait(&mut self) -> ::nb::Result<(), Infallible> { Err(::nb::Error::WouldBlock) }
|
356 | 357 | //! # }
|
357 | 358 | //! #
|
|
380 | 381 | //! (same remark concerning the availability of `libstd` on the
|
381 | 382 | //! target).
|
382 | 383 | //!
|
383 |
| -//! ```not_run |
| 384 | +//! ```no_run |
384 | 385 | //! #![feature(generator_trait)]
|
385 | 386 | //! #![feature(generators)]
|
386 | 387 | //!
|
|
437 | 438 | //!
|
438 | 439 | //! // Event loop
|
439 | 440 | //! loop {
|
440 |
| -//! Pin::new(&mut blinky).resume(); |
441 |
| -//! Pin::new(&mut loopback).resume(); |
| 441 | +//! Pin::new(&mut blinky).resume(()); |
| 442 | +//! Pin::new(&mut loopback).resume(()); |
442 | 443 | //! # break;
|
443 | 444 | //! }
|
444 | 445 | //! }
|
|
553 | 554 | //!
|
554 | 555 | //! - Asynchronous SPI transfer
|
555 | 556 | //!
|
556 |
| -//! ```not_run |
| 557 | +//! ```no_run |
557 | 558 | //! #![feature(conservative_impl_trait)]
|
558 | 559 | //! #![feature(generators)]
|
559 | 560 | //! #![feature(generator_trait)]
|
|
0 commit comments