From 2363a019e2f8005058ebd69f62cb87c778934d9f Mon Sep 17 00:00:00 2001 From: Rukai Date: Tue, 18 May 2021 22:11:20 +1000 Subject: [PATCH] Fix all warnings on embassy-rp and embassy-rp-examples and embassy-std-examples --- embassy-rp-examples/src/bin/button.rs | 1 - embassy-rp-examples/src/bin/uart.rs | 1 - embassy-rp/build.rs | 6 +++--- embassy-rp/src/dma.rs | 4 ++-- embassy-rp/src/lib.rs | 3 ++- embassy-rp/src/pll.rs | 4 +--- embassy-std-examples/src/bin/serial.rs | 1 + embassy-std-examples/src/bin/tick.rs | 1 + 8 files changed, 10 insertions(+), 11 deletions(-) diff --git a/embassy-rp-examples/src/bin/button.rs b/embassy-rp-examples/src/bin/button.rs index 007d07a36..c4d942ff5 100644 --- a/embassy-rp-examples/src/bin/button.rs +++ b/embassy-rp-examples/src/bin/button.rs @@ -9,7 +9,6 @@ #[path = "../example_common.rs"] mod example_common; -use defmt::*; use embassy::executor::Spawner; use embassy_rp::gpio::{Input, Level, Output, Pull}; use embassy_rp::Peripherals; diff --git a/embassy-rp-examples/src/bin/uart.rs b/embassy-rp-examples/src/bin/uart.rs index 82bd4cb6a..8b5f2a53b 100644 --- a/embassy-rp-examples/src/bin/uart.rs +++ b/embassy-rp-examples/src/bin/uart.rs @@ -9,7 +9,6 @@ #[path = "../example_common.rs"] mod example_common; -use defmt::*; use embassy::executor::Spawner; use embassy_rp::{uart, Peripherals}; diff --git a/embassy-rp/build.rs b/embassy-rp/build.rs index bc59ea23b..f41ccd220 100644 --- a/embassy-rp/build.rs +++ b/embassy-rp/build.rs @@ -1,7 +1,7 @@ -use std::fs::{self, File}; +use std::env; +use std::fs::File; use std::io::Write; -use std::path::{Path, PathBuf}; -use std::{env, ffi::OsStr}; +use std::path::PathBuf; fn main() { // Put the linker script somewhere the linker can find it diff --git a/embassy-rp/src/dma.rs b/embassy-rp/src/dma.rs index 60c1b8809..a74b9b92b 100644 --- a/embassy-rp/src/dma.rs +++ b/embassy-rp/src/dma.rs @@ -1,11 +1,11 @@ use core::sync::atomic::{compiler_fence, Ordering}; -use crate::fmt::{assert, *}; +use crate::fmt::assert; use crate::pac::dma::vals; use crate::{pac, peripherals}; pub struct Dma { - inner: T, + _inner: T, } impl Dma { diff --git a/embassy-rp/src/lib.rs b/embassy-rp/src/lib.rs index f1a045987..a66ced74a 100644 --- a/embassy-rp/src/lib.rs +++ b/embassy-rp/src/lib.rs @@ -3,6 +3,7 @@ #![feature(asm)] #![feature(type_alias_impl_trait)] #![feature(never_type)] +#![allow(incomplete_features)] pub use rp2040_pac2 as pac; @@ -87,7 +88,7 @@ pub mod config { } } -pub fn init(config: config::Config) -> Peripherals { +pub fn init(_config: config::Config) -> Peripherals { // Do this first, so that it panics if user is calling `init` a second time // before doing anything important. let peripherals = Peripherals::take(); diff --git a/embassy-rp/src/pll.rs b/embassy-rp/src/pll.rs index fb643b016..befb368c5 100644 --- a/embassy-rp/src/pll.rs +++ b/embassy-rp/src/pll.rs @@ -1,6 +1,4 @@ -use core::ops::Deref; - -use crate::fmt::{assert, *}; +use crate::fmt::assert; use crate::pac; const XOSC_MHZ: u32 = 12; diff --git a/embassy-std-examples/src/bin/serial.rs b/embassy-std-examples/src/bin/serial.rs index 79f10c418..1b22dc0de 100644 --- a/embassy-std-examples/src/bin/serial.rs +++ b/embassy-std-examples/src/bin/serial.rs @@ -1,6 +1,7 @@ #![feature(min_type_alias_impl_trait)] #![feature(impl_trait_in_bindings)] #![feature(type_alias_impl_trait)] +#![allow(incomplete_features)] #[path = "../serial_port.rs"] mod serial_port; diff --git a/embassy-std-examples/src/bin/tick.rs b/embassy-std-examples/src/bin/tick.rs index 47713f7ba..6f30edb34 100644 --- a/embassy-std-examples/src/bin/tick.rs +++ b/embassy-std-examples/src/bin/tick.rs @@ -1,6 +1,7 @@ #![feature(min_type_alias_impl_trait)] #![feature(impl_trait_in_bindings)] #![feature(type_alias_impl_trait)] +#![allow(incomplete_features)] use embassy::time::{Duration, Timer}; use embassy::util::Forever;