|
95 | 95 | //! ``` |
96 | 96 | //! extern crate nb; |
97 | 97 | //! |
| 98 | +//! # use std as core; |
98 | 99 | //! use core::convert::Infallible; |
99 | 100 | //! |
100 | 101 | //! /// A count down timer |
|
222 | 223 | //! # } |
223 | 224 | //! |
224 | 225 | //! # mod stm32f30x_hal { |
225 | | -//! # use core::convert::Infallible; |
| 226 | +//! # use std::convert::Infallible; |
226 | 227 | //! # pub struct Serial1; |
227 | 228 | //! # impl Serial1 { |
228 | 229 | //! # pub fn write(&mut self, _: u8) -> ::nb::Result<(), Infallible> { |
|
252 | 253 | //! }; |
253 | 254 | //! use futures::future::Loop; |
254 | 255 | //! use stm32f30x_hal::{Led, Serial1, Timer6}; |
255 | | -//! use core::convert::Infallible; |
| 256 | +//! use std::convert::Infallible; |
256 | 257 | //! |
257 | 258 | //! /// `futures` version of `CountDown.wait` |
258 | 259 | //! /// |
|
346 | 347 | //! } |
347 | 348 | //! |
348 | 349 | //! # mod stm32f30x_hal { |
349 | | -//! # use core::convert::Infallible; |
| 350 | +//! # use std::convert::Infallible; |
350 | 351 | //! # pub struct Timer6; |
351 | 352 | //! # impl ::hal::timer::CountDown for Timer6 { |
352 | 353 | //! # type Time = (); |
|
442 | 443 | //! } |
443 | 444 | //! |
444 | 445 | //! # mod stm32f30x_hal { |
445 | | -//! # use core::convert::Infallible; |
| 446 | +//! # use std::convert::Infallible; |
446 | 447 | //! # pub struct Serial1; |
447 | 448 | //! # impl Serial1 { |
448 | 449 | //! # pub fn read(&mut self) -> ::nb::Result<u8, Infallible> { Err(::nb::Error::WouldBlock) } |
|
589 | 590 | //! - Buffered serial interface with periodic flushing in interrupt handler |
590 | 591 | //! |
591 | 592 | //! ``` |
| 593 | +//! # use std as core; |
592 | 594 | //! extern crate embedded_hal as hal; |
593 | 595 | //! extern crate nb; |
594 | 596 | //! |
@@ -724,7 +726,7 @@ pub mod watchdog; |
724 | 726 | /// println!("Period: {} ms", period); |
725 | 727 | /// } |
726 | 728 | /// |
727 | | -/// # use core::convert::Infallible; |
| 729 | +/// # use std::convert::Infallible; |
728 | 730 | /// # struct MilliSeconds(u32); |
729 | 731 | /// # trait U32Ext { fn ms(self) -> MilliSeconds; } |
730 | 732 | /// # impl U32Ext for u32 { fn ms(self) -> MilliSeconds { MilliSeconds(self) } } |
@@ -940,7 +942,7 @@ pub trait PwmPin { |
940 | 942 | /// println!("Speed: {} pulses per second", speed); |
941 | 943 | /// } |
942 | 944 | /// |
943 | | -/// # use core::convert::Infallible; |
| 945 | +/// # use std::convert::Infallible; |
944 | 946 | /// # struct Seconds(u32); |
945 | 947 | /// # trait U32Ext { fn s(self) -> Seconds; } |
946 | 948 | /// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } } |
|
0 commit comments