diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:52:41 +0200 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2020-06-21 22:52:41 +0200 |
commit | 6aed921780dbe12c058e0aa0ce8b617e404b5a87 (patch) | |
tree | 3b76c4d8946aede3e48fcfade62a2e19488ee118 /src/devices/features/tier1.rs | |
parent | b7e9c9acf1bb42f4966930354135782bab57394a (diff) | |
download | ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.gz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.tar.xz ads1x1x-async-6aed921780dbe12c058e0aa0ce8b617e404b5a87.zip |
Use edition 2018
Diffstat (limited to 'src/devices/features/tier1.rs')
-rw-r--r-- | src/devices/features/tier1.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/devices/features/tier1.rs b/src/devices/features/tier1.rs index 9e5cb77..0c940ee 100644 --- a/src/devices/features/tier1.rs +++ b/src/devices/features/tier1.rs @@ -1,6 +1,8 @@ //! Common functions -use {ic, interface, Ads1x1x, BitFlags as BF, DataRate12Bit, DataRate16Bit, Error, Register}; +use crate::{ + ic, interface, Ads1x1x, BitFlags as BF, DataRate12Bit, DataRate16Bit, Error, Register, +}; impl<DI, IC, MODE, E> Ads1x1x<DI, IC, ic::Resolution12Bit, MODE> where @@ -8,7 +10,7 @@ where { /// Set data rate pub fn set_data_rate(&mut self, rate: DataRate12Bit) -> Result<(), Error<E>> { - use DataRate12Bit as DR; + use crate::DataRate12Bit as DR; let cfg = self.config.clone(); let config = match rate { DR::Sps128 => cfg.with_low(BF::DR2).with_low(BF::DR1).with_low(BF::DR0), @@ -31,7 +33,7 @@ where { /// Set data rate pub fn set_data_rate(&mut self, rate: DataRate16Bit) -> Result<(), Error<E>> { - use DataRate16Bit as DR; + use crate::DataRate16Bit as DR; let cfg = self.config.clone(); let config = match rate { DR::Sps8 => cfg.with_low(BF::DR2).with_low(BF::DR1).with_low(BF::DR0), |