From bec7019f3aaa337225952fb1d78aaf642e212cef Mon Sep 17 00:00:00 2001 From: Astro Date: Thu, 19 Mar 2020 22:21:17 +0100 Subject: [PATCH] delint --- src/ad7172/adc.rs | 2 +- src/ad7172/mod.rs | 2 +- src/channel_state.rs | 1 - src/command_parser.rs | 2 +- src/main.rs | 3 --- src/pins.rs | 8 ++------ src/server.rs | 1 - src/session.rs | 1 - 8 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/ad7172/adc.rs b/src/ad7172/adc.rs index 2bea65c..9430192 100644 --- a/src/ad7172/adc.rs +++ b/src/ad7172/adc.rs @@ -1,7 +1,7 @@ use core::fmt; use embedded_hal::digital::v2::OutputPin; use embedded_hal::blocking::spi::Transfer; -use log::{info, warn}; +use log::info; use super::checksum::{ChecksumMode, Checksum}; use super::AdcError; use super::{ diff --git a/src/ad7172/mod.rs b/src/ad7172/mod.rs index bfbaeab..ea0ac93 100644 --- a/src/ad7172/mod.rs +++ b/src/ad7172/mod.rs @@ -1,7 +1,7 @@ use core::fmt; use num_traits::float::Float; use stm32f4xx_hal::{ - time::{MegaHertz, U32Ext}, + time::MegaHertz, spi, }; diff --git a/src/channel_state.rs b/src/channel_state.rs index 9bd1f56..6caa48b 100644 --- a/src/channel_state.rs +++ b/src/channel_state.rs @@ -37,4 +37,3 @@ impl ChannelState { self.dac_value = (output * (ad5680::MAX_VALUE as f64)) as u32; } } - diff --git a/src/command_parser.rs b/src/command_parser.rs index f803d80..3f3adae 100644 --- a/src/command_parser.rs +++ b/src/command_parser.rs @@ -7,7 +7,7 @@ use nom::{ bytes::complete::{is_a, tag, take_while1}, character::{is_digit, complete::{char, one_of}}, combinator::{complete, map, opt, value}, - sequence::{preceded, separated_pair}, + sequence::preceded, multi::{fold_many0, fold_many1}, error::ErrorKind, }; diff --git a/src/main.rs b/src/main.rs index f065896..9a4b39d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -383,9 +383,6 @@ fn main() -> ! { Ok(SessionOutput::Error(e)) => { let _ = writeln!(socket, "Command error: {:?}", e); } - Ok(o) => { - let _ = writeln!(socket, "Not yet implemented"); - } Err(_) => socket.close(), } diff --git a/src/pins.rs b/src/pins.rs index cfe5f90..c984d8a 100644 --- a/src/pins.rs +++ b/src/pins.rs @@ -1,7 +1,3 @@ -use embedded_hal::{ - blocking::spi::Transfer, - digital::v2::OutputPin, -}; use stm32f4xx_hal::{ gpio::{ AF5, Alternate, @@ -17,9 +13,9 @@ use stm32f4xx_hal::{ }, rcc::Clocks, pwm::{self, PwmChannels}, - spi::{self, Spi, NoMiso}, + spi::{Spi, NoMiso}, stm32::{GPIOA, GPIOB, GPIOC, GPIOE, GPIOF, GPIOG, SPI2, SPI4, SPI5, TIM1, TIM3}, - time::{U32Ext, Hertz, MegaHertz}, + time::U32Ext, }; diff --git a/src/server.rs b/src/server.rs index 5a1005f..07a2402 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1,4 +1,3 @@ -use core::fmt; use core::mem::MaybeUninit; use smoltcp::{ iface::EthernetInterface, diff --git a/src/session.rs b/src/session.rs index 6136c55..aeeb95f 100644 --- a/src/session.rs +++ b/src/session.rs @@ -1,4 +1,3 @@ -use core::ops::Deref; use super::command_parser::{Command, Error as ParserError}; const MAX_LINE_LEN: usize = 64;