Get rid of some warnings

This commit is contained in:
Thales Fragoso 2021-05-11 01:34:10 -03:00
parent c183c352c7
commit a130499c9a
6 changed files with 2 additions and 7 deletions

View File

@ -1,4 +1,3 @@
#![no_std]
#![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"] #![doc = "Peripheral access API (generated using svd2rust v0.17.0 (22741fa 2021-04-20))"]
pub mod dma_v2 { pub mod dma_v2 {
use crate::generic::*; use crate::generic::*;

View File

@ -19,13 +19,13 @@ pub enum Error {
} }
pub struct Random<T: Instance> { pub struct Random<T: Instance> {
inner: T, _inner: T,
} }
impl<T: Instance> Random<T> { impl<T: Instance> Random<T> {
pub fn new(inner: impl Unborrow<Target = T>) -> Self { pub fn new(inner: impl Unborrow<Target = T>) -> Self {
unborrow!(inner); unborrow!(inner);
let mut random = Self { inner }; let mut random = Self { _inner: inner };
random.reset(); random.reset();
random random
} }

View File

@ -1,5 +1,4 @@
use core::future::Future; use core::future::Future;
use core::pin::Pin;
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]

View File

@ -1,5 +1,4 @@
use core::future::Future; use core::future::Future;
use core::pin::Pin;
/// Wait for a pin to become high. /// Wait for a pin to become high.
pub trait WaitForHigh { pub trait WaitForHigh {

View File

@ -1,7 +1,6 @@
//! Async SPI API //! Async SPI API
use core::future::Future; use core::future::Future;
use core::pin::Pin;
/// Full duplex (master mode) /// Full duplex (master mode)
/// ///

View File

@ -1,5 +1,4 @@
use core::future::Future; use core::future::Future;
use core::pin::Pin;
#[derive(Copy, Clone, Debug, Eq, PartialEq)] #[derive(Copy, Clone, Debug, Eq, PartialEq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))] #[cfg_attr(feature = "defmt", derive(defmt::Format))]