From 6aed921780dbe12c058e0aa0ce8b617e404b5a87 Mon Sep 17 00:00:00 2001 From: Diego Barrios Romero Date: Sun, 21 Jun 2020 22:52:41 +0200 Subject: Use edition 2018 --- src/devices/mode/oneshot.rs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/devices/mode/oneshot.rs') diff --git a/src/devices/mode/oneshot.rs b/src/devices/mode/oneshot.rs index 5901292..579c2fb 100644 --- a/src/devices/mode/oneshot.rs +++ b/src/devices/mode/oneshot.rs @@ -1,10 +1,11 @@ //! Common functions - -use super::super::OperatingMode; -use channels::ChannelSelection; +use crate::{ + channels::ChannelSelection, conversion, devices::OperatingMode, interface, mode, Ads1x1x, + BitFlags, Config, Error, ModeChangeError, Register, +}; use core::marker::PhantomData; -use {conversion, hal, interface, nb}; -use {mode, Ads1x1x, BitFlags, Config, Error, ModeChangeError, Register}; +use embedded_hal::adc; +use nb; impl Ads1x1x where @@ -35,12 +36,12 @@ where } } -impl hal::adc::OneShot, i16, CH> +impl adc::OneShot, i16, CH> for Ads1x1x where DI: interface::ReadData + interface::WriteData, CONV: conversion::ConvertMeasurement, - CH: hal::adc::Channel, ID = ChannelSelection>, + CH: adc::Channel, ID = ChannelSelection>, { type Error = Error; -- cgit v1.2.3-54-g00ecf