From 55e5b0dc96b395fa0e1aa266a1de429d21bef1ba Mon Sep 17 00:00:00 2001 From: Vladan Popovic Date: Tue, 21 Jun 2022 01:27:27 +0200 Subject: [PATCH] rename IterableRx to RxIter --- src/modem.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modem.rs b/src/modem.rs index 7fabae3..700c166 100644 --- a/src/modem.rs +++ b/src/modem.rs @@ -11,7 +11,7 @@ use esp_idf_hal::serial::{self, Rx, Tx}; pub type Result = std::result::Result; pub struct Modem { - rx: IterableRx, + rx: RxIter, tx: Tx, } @@ -32,12 +32,12 @@ impl std::fmt::Display for ModemError { } } -pub struct IterableRx { +pub struct RxIter { inner: Rx, timeout: Duration, } -impl IterableRx { +impl RxIter { fn reset(&mut self, timeout: Duration) -> &mut Self { self.timeout = timeout; self @@ -69,7 +69,7 @@ impl IterableRx { } } -impl Iterator for IterableRx { +impl Iterator for RxIter { type Item = u8; /// `nb` returns Ok(byte), or one of Err(WouldBlock) and Err(Other) which isn't of anyone's @@ -98,7 +98,7 @@ impl Iterator for IterableRx { impl Modem { pub fn new(tx: Tx, rx: Rx) -> Self { Self { - rx: IterableRx { inner: rx, timeout: Duration::from_millis(0) }, + rx: RxIter { inner: rx, timeout: Duration::from_millis(0) }, tx, } }