From 3779cf1770e1be03d60623d965f5e56897fbfa43 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sun, 11 Nov 2018 17:42:15 +0100 Subject: Avoid unnecessary type --- src/construction/i2c.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/construction') 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 Ads1x1x, ic::$IC, $conv, mode::OneShot> where I2C: blocking::i2c::Write + blocking::i2c::WriteRead @@ -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); -- cgit v1.2.3-54-g00ecf