Skip to content

Commit c579281

Browse files
committed
Fix tests
1 parent 7432e4a commit c579281

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/digital/v2.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub trait ToggleableOutputPin {
5959
/// ```
6060
/// use embedded_hal::digital::v2::{OutputPin, StatefulOutputPin, ToggleableOutputPin};
6161
/// use embedded_hal::digital::v2::toggleable;
62-
/// use core::convert::Infallible;
62+
/// use std::convert::Infallible;
6363
///
6464
/// /// A virtual output pin that exists purely in software
6565
/// struct MyPin {

src/lib.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
//! ```
9696
//! extern crate nb;
9797
//!
98+
//! # use std as core;
9899
//! use core::convert::Infallible;
99100
//!
100101
//! /// A count down timer
@@ -222,7 +223,7 @@
222223
//! # }
223224
//!
224225
//! # mod stm32f30x_hal {
225-
//! # use core::convert::Infallible;
226+
//! # use std::convert::Infallible;
226227
//! # pub struct Serial1;
227228
//! # impl Serial1 {
228229
//! # pub fn write(&mut self, _: u8) -> ::nb::Result<(), Infallible> {
@@ -252,7 +253,7 @@
252253
//! };
253254
//! use futures::future::Loop;
254255
//! use stm32f30x_hal::{Led, Serial1, Timer6};
255-
//! use core::convert::Infallible;
256+
//! use std::convert::Infallible;
256257
//!
257258
//! /// `futures` version of `CountDown.wait`
258259
//! ///
@@ -346,7 +347,7 @@
346347
//! }
347348
//!
348349
//! # mod stm32f30x_hal {
349-
//! # use core::convert::Infallible;
350+
//! # use std::convert::Infallible;
350351
//! # pub struct Timer6;
351352
//! # impl ::hal::timer::CountDown for Timer6 {
352353
//! # type Time = ();
@@ -442,7 +443,7 @@
442443
//! }
443444
//!
444445
//! # mod stm32f30x_hal {
445-
//! # use core::convert::Infallible;
446+
//! # use std::convert::Infallible;
446447
//! # pub struct Serial1;
447448
//! # impl Serial1 {
448449
//! # pub fn read(&mut self) -> ::nb::Result<u8, Infallible> { Err(::nb::Error::WouldBlock) }
@@ -589,6 +590,7 @@
589590
//! - Buffered serial interface with periodic flushing in interrupt handler
590591
//!
591592
//! ```
593+
//! # use std as core;
592594
//! extern crate embedded_hal as hal;
593595
//! extern crate nb;
594596
//!
@@ -724,7 +726,7 @@ pub mod watchdog;
724726
/// println!("Period: {} ms", period);
725727
/// }
726728
///
727-
/// # use core::convert::Infallible;
729+
/// # use std::convert::Infallible;
728730
/// # struct MilliSeconds(u32);
729731
/// # trait U32Ext { fn ms(self) -> MilliSeconds; }
730732
/// # impl U32Ext for u32 { fn ms(self) -> MilliSeconds { MilliSeconds(self) } }
@@ -940,7 +942,7 @@ pub trait PwmPin {
940942
/// println!("Speed: {} pulses per second", speed);
941943
/// }
942944
///
943-
/// # use core::convert::Infallible;
945+
/// # use std::convert::Infallible;
944946
/// # struct Seconds(u32);
945947
/// # trait U32Ext { fn s(self) -> Seconds; }
946948
/// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } }

src/timer.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use core::convert::Infallible;
4040
/// Led.off();
4141
/// }
4242
///
43-
/// # use core::convert::Infallible;
43+
/// # use std::convert::Infallible;
4444
/// # struct Seconds(u32);
4545
/// # trait U32Ext { fn s(self) -> Seconds; }
4646
/// # impl U32Ext for u32 { fn s(self) -> Seconds { Seconds(self) } }

0 commit comments

Comments
 (0)