Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Disasm committed Aug 20, 2019
1 parent 7432e4a commit c579281
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/digital/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub trait ToggleableOutputPin {
/// ```
/// use embedded_hal::digital::v2::{OutputPin, StatefulOutputPin, ToggleableOutputPin};
/// use embedded_hal::digital::v2::toggleable;
/// use core::convert::Infallible;
/// use std::convert::Infallible;
///
/// /// A virtual output pin that exists purely in software
/// struct MyPin {
Expand Down
14 changes: 8 additions & 6 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
//! ```
//! extern crate nb;
//!
//! # use std as core;
//! use core::convert::Infallible;
//!
//! /// A count down timer
Expand Down Expand Up @@ -222,7 +223,7 @@
//! # }
//!
//! # mod stm32f30x_hal {
//! # use core::convert::Infallible;
//! # use std::convert::Infallible;
//! # pub struct Serial1;
//! # impl Serial1 {
//! # pub fn write(&mut self, _: u8) -> ::nb::Result<(), Infallible> {
Expand Down Expand Up @@ -252,7 +253,7 @@
//! };
//! use futures::future::Loop;
//! use stm32f30x_hal::{Led, Serial1, Timer6};
//! use core::convert::Infallible;
//! use std::convert::Infallible;
//!
//! /// `futures` version of `CountDown.wait`
//! ///
Expand Down Expand Up @@ -346,7 +347,7 @@
//! }
//!
//! # mod stm32f30x_hal {
//! # use core::convert::Infallible;
//! # use std::convert::Infallible;
//! # pub struct Timer6;
//! # impl ::hal::timer::CountDown for Timer6 {
//! # type Time = ();
Expand Down Expand Up @@ -442,7 +443,7 @@
//! }
//!
//! # mod stm32f30x_hal {
//! # use core::convert::Infallible;
//! # use std::convert::Infallible;
//! # pub struct Serial1;
//! # impl Serial1 {
//! # pub fn read(&mut self) -> ::nb::Result<u8, Infallible> { Err(::nb::Error::WouldBlock) }
Expand Down Expand Up @@ -589,6 +590,7 @@
//! - Buffered serial interface with periodic flushing in interrupt handler
//!
//! ```
//! # use std as core;
//! extern crate embedded_hal as hal;
//! extern crate nb;
//!
Expand Down Expand Up @@ -724,7 +726,7 @@ pub mod watchdog;
/// println!("Period: {} ms", period);
/// }
///
/// # use core::convert::Infallible;
/// # use std::convert::Infallible;
/// # struct MilliSeconds(u32);
/// # trait U32Ext { fn ms(self) -> MilliSeconds; }
/// # impl U32Ext for u32 { fn ms(self) -> MilliSeconds { MilliSeconds(self) } }
Expand Down Expand Up @@ -940,7 +942,7 @@ pub trait PwmPin {
/// println!("Speed: {} pulses per second", speed);
/// }
///
/// # use core::convert::Infallible;
/// # use std::convert::Infallible;
/// # struct Seconds(u32);
/// # trait U32Ext { fn s(self) -> Seconds; }
/// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } }
Expand Down
2 changes: 1 addition & 1 deletion src/timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use core::convert::Infallible;
/// Led.off();
/// }
///
/// # use core::convert::Infallible;
/// # use std::convert::Infallible;
/// # struct Seconds(u32);
/// # trait U32Ext { fn s(self) -> Seconds; }
/// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } }
Expand Down

0 comments on commit c579281

Please sign in to comment.