diff options
author | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 17:42:15 +0100 |
---|---|---|
committer | Diego Barrios Romero <eldruin@gmail.com> | 2018-11-11 17:42:15 +0100 |
commit | 3779cf1770e1be03d60623d965f5e56897fbfa43 (patch) | |
tree | 9b2c39df847e0cbc2b2ba9a7b93f7712a25140f6 /src/construction/i2c.rs | |
parent | fce3d8546bd619964ec5dd1594cd93e744a99521 (diff) | |
download | ads1x1x-async-3779cf1770e1be03d60623d965f5e56897fbfa43.tar.gz ads1x1x-async-3779cf1770e1be03d60623d965f5e56897fbfa43.tar.xz ads1x1x-async-3779cf1770e1be03d60623d965f5e56897fbfa43.zip |
Avoid unnecessary type
Diffstat (limited to 'src/construction/i2c.rs')
-rw-r--r-- | src/construction/i2c.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/construction/i2c.rs b/src/construction/i2c.rs index 3ec474b..4fa4177 100644 --- a/src/construction/i2c.rs +++ b/src/construction/i2c.rs @@ -8,7 +8,7 @@ use interface::I2cInterface; macro_rules! impl_new_destroy { - ( $IC:ident, $create:ident, $destroy:ident, $conv:ty, $converter:expr ) => { + ( $IC:ident, $create:ident, $destroy:ident, $conv:ty ) => { impl<I2C, E> Ads1x1x<I2cInterface<I2C>, ic::$IC, $conv, mode::OneShot> where I2C: blocking::i2c::Write<Error = E> + blocking::i2c::WriteRead<Error = E> @@ -22,7 +22,7 @@ macro_rules! impl_new_destroy { }, config: Config::default(), a_conversion_was_started: false, - converter: $converter(()), + _conv: PhantomData, _ic: PhantomData, _mode: PhantomData } @@ -38,9 +38,9 @@ macro_rules! impl_new_destroy { } } -impl_new_destroy!(Ads1013, new_ads1013, destroy_ads1013, ic::Resolution12Bit, ic::Resolution12Bit); -impl_new_destroy!(Ads1113, new_ads1113, destroy_ads1113, ic::Resolution16Bit, ic::Resolution16Bit); -impl_new_destroy!(Ads1014, new_ads1014, destroy_ads1014, ic::Resolution12Bit, ic::Resolution12Bit); -impl_new_destroy!(Ads1114, new_ads1114, destroy_ads1114, ic::Resolution16Bit, ic::Resolution16Bit); -impl_new_destroy!(Ads1015, new_ads1015, destroy_ads1015, ic::Resolution12Bit, ic::Resolution12Bit); -impl_new_destroy!(Ads1115, new_ads1115, destroy_ads1115, ic::Resolution16Bit, ic::Resolution16Bit); +impl_new_destroy!(Ads1013, new_ads1013, destroy_ads1013, ic::Resolution12Bit); +impl_new_destroy!(Ads1113, new_ads1113, destroy_ads1113, ic::Resolution16Bit); +impl_new_destroy!(Ads1014, new_ads1014, destroy_ads1014, ic::Resolution12Bit); +impl_new_destroy!(Ads1114, new_ads1114, destroy_ads1114, ic::Resolution16Bit); +impl_new_destroy!(Ads1015, new_ads1015, destroy_ads1015, ic::Resolution12Bit); +impl_new_destroy!(Ads1115, new_ads1115, destroy_ads1115, ic::Resolution16Bit); |