From a130499c9a1b999ac267c2107205898e2002534b Mon Sep 17 00:00:00 2001 From: Thales Fragoso Date: Tue, 11 May 2021 01:34:10 -0300 Subject: [PATCH] Get rid of some warnings --- embassy-stm32/src/pac/regs.rs | 1 - embassy-stm32/src/rng.rs | 4 ++-- embassy-traits/src/flash.rs | 1 - embassy-traits/src/gpio.rs | 1 - embassy-traits/src/spi.rs | 1 - embassy-traits/src/uart.rs | 1 - 6 files changed, 2 insertions(+), 7 deletions(-) diff --git a/embassy-stm32/src/pac/regs.rs b/embassy-stm32/src/pac/regs.rs index 0a9c50da..a32b4c18 100644 --- a/embassy-stm32/src/pac/regs.rs +++ b/embassy-stm32/src/pac/regs.rs @@ -1,4 +1,3 @@ -#![no_std] #![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"] pub mod dma_v2 { use crate::generic::*; diff --git a/embassy-stm32/src/rng.rs b/embassy-stm32/src/rng.rs index bc613e0a..d7338ac9 100644 --- a/embassy-stm32/src/rng.rs +++ b/embassy-stm32/src/rng.rs @@ -19,13 +19,13 @@ pub enum Error { } pub struct Random { - inner: T, + _inner: T, } impl Random { pub fn new(inner: impl Unborrow) -> Self { unborrow!(inner); - let mut random = Self { inner }; + let mut random = Self { _inner: inner }; random.reset(); random } diff --git a/embassy-traits/src/flash.rs b/embassy-traits/src/flash.rs index c9b14a39..5e0a4e39 100644 --- a/embassy-traits/src/flash.rs +++ b/embassy-traits/src/flash.rs @@ -1,5 +1,4 @@ use core::future::Future; -use core::pin::Pin; #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))] diff --git a/embassy-traits/src/gpio.rs b/embassy-traits/src/gpio.rs index c4ae206c..9fdb41f5 100644 --- a/embassy-traits/src/gpio.rs +++ b/embassy-traits/src/gpio.rs @@ -1,5 +1,4 @@ use core::future::Future; -use core::pin::Pin; /// Wait for a pin to become high. pub trait WaitForHigh { diff --git a/embassy-traits/src/spi.rs b/embassy-traits/src/spi.rs index 771ebf2f..227b8bfe 100644 --- a/embassy-traits/src/spi.rs +++ b/embassy-traits/src/spi.rs @@ -1,7 +1,6 @@ //! Async SPI API use core::future::Future; -use core::pin::Pin; /// Full duplex (master mode) /// diff --git a/embassy-traits/src/uart.rs b/embassy-traits/src/uart.rs index 9e76306b..755aee6d 100644 --- a/embassy-traits/src/uart.rs +++ b/embassy-traits/src/uart.rs @@ -1,5 +1,4 @@ use core::future::Future; -use core::pin::Pin; #[derive(Copy, Clone, Debug, Eq, PartialEq)] #[cfg_attr(feature = "defmt", derive(defmt::Format))]