use Duration::ZERO when reading times out
This commit is contained in:
parent
10c61f5d78
commit
f0d474d062
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ impl<UART: serial::Uart> Iterator for RxIter<UART> {
|
||||||
},
|
},
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
if start.elapsed() > self.timeout {
|
if start.elapsed() > self.timeout {
|
||||||
self.timeout = Duration::from_millis(0);
|
self.timeout = Duration::ZERO;
|
||||||
break None
|
break None
|
||||||
}
|
}
|
||||||
thread::sleep(Duration::from_millis(200));
|
thread::sleep(Duration::from_millis(200));
|
||||||
|
|
Loading…
Reference in a new issue