12
12
//! [`std::thread::sleep`](https://doc.rust-lang.org/std/thread/fn.sleep.html)
13
13
//! to implement the delay.
14
14
15
- use core:: convert:: Infallible ;
16
15
use std:: thread;
17
16
use std:: time:: Duration ;
17
+ use void:: Void ;
18
18
19
19
use embedded_hal:: blocking:: delay;
20
20
@@ -31,7 +31,7 @@ impl MockNoop {
31
31
macro_rules! impl_noop_delay_us {
32
32
( $type: ty) => {
33
33
impl delay:: DelayUs <$type> for MockNoop {
34
- type Error = Infallible ;
34
+ type Error = Void ;
35
35
36
36
/// A no-op delay implementation.
37
37
fn try_delay_us( & mut self , _n: $type) -> Result <( ) , Self :: Error > {
@@ -49,7 +49,7 @@ impl_noop_delay_us!(u64);
49
49
macro_rules! impl_noop_delay_ms {
50
50
( $type: ty) => {
51
51
impl delay:: DelayMs <$type> for MockNoop {
52
- type Error = Infallible ;
52
+ type Error = Void ;
53
53
54
54
/// A no-op delay implementation.
55
55
fn try_delay_ms( & mut self , _n: $type) -> Result <( ) , Self :: Error > {
@@ -77,7 +77,7 @@ impl StdSleep {
77
77
macro_rules! impl_stdsleep_delay_us {
78
78
( $type: ty) => {
79
79
impl delay:: DelayUs <$type> for StdSleep {
80
- type Error = Infallible ;
80
+ type Error = Void ;
81
81
82
82
/// A `Delay` implementation that uses `std::thread::sleep`.
83
83
fn try_delay_us( & mut self , n: $type) -> Result <( ) , Self :: Error > {
@@ -96,7 +96,7 @@ impl_stdsleep_delay_us!(u64);
96
96
macro_rules! impl_stdsleep_delay_ms {
97
97
( $type: ty) => {
98
98
impl delay:: DelayMs <$type> for StdSleep {
99
- type Error = Infallible ;
99
+ type Error = Void ;
100
100
101
101
/// A `Delay` implementation that uses `std::thread::sleep`.
102
102
fn try_delay_ms( & mut self , n: $type) -> Result <( ) , Self :: Error > {
0 commit comments