From d4f2c6cf00b481f5d346bc3a1cd820883c8add23 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Tue, 2 Mar 2021 21:14:58 +0100 Subject: [PATCH] Remove cargo namespaced-features --- .cargo/config | 2 -- .github/workflows/rust.yml | 2 +- test-build.sh => ci.sh | 0 embassy-nrf-examples/.cargo/config | 1 - embassy-nrf-examples/Cargo.toml | 1 + embassy-nrf/src/gpiote.rs | 2 +- embassy-stm32f4-examples/Cargo.toml | 1 + embassy-traits/Cargo.toml | 10 ++-------- embassy/Cargo.toml | 12 ++++++------ 9 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 .cargo/config rename test-build.sh => ci.sh (100%) diff --git a/.cargo/config b/.cargo/config deleted file mode 100644 index a14129b9d..000000000 --- a/.cargo/config +++ /dev/null @@ -1,2 +0,0 @@ -[unstable] -namespaced-features = true diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 44e092a67..006416121 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,4 +22,4 @@ jobs: components: rust-src override: true - name: Build - run: ./test-build.sh + run: ./ci.sh diff --git a/test-build.sh b/ci.sh similarity index 100% rename from test-build.sh rename to ci.sh diff --git a/embassy-nrf-examples/.cargo/config b/embassy-nrf-examples/.cargo/config index 37e38ec95..17b9c8d80 100644 --- a/embassy-nrf-examples/.cargo/config +++ b/embassy-nrf-examples/.cargo/config @@ -1,5 +1,4 @@ [unstable] -namespaced-features = true build-std = ["core"] build-std-features = ["panic_immediate_abort"] diff --git a/embassy-nrf-examples/Cargo.toml b/embassy-nrf-examples/Cargo.toml index cf82a475f..1f67b6a8c 100644 --- a/embassy-nrf-examples/Cargo.toml +++ b/embassy-nrf-examples/Cargo.toml @@ -18,6 +18,7 @@ defmt-error = [] [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] } +embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] } embassy-nrf = { version = "0.1.0", path = "../embassy-nrf", features = ["defmt", "defmt-trace", "52840"] } defmt = "0.2.0" diff --git a/embassy-nrf/src/gpiote.rs b/embassy-nrf/src/gpiote.rs index 7cc649107..5dc80a639 100644 --- a/embassy-nrf/src/gpiote.rs +++ b/embassy-nrf/src/gpiote.rs @@ -4,8 +4,8 @@ use core::ops::Deref; use core::pin::Pin; use core::ptr; use core::task::{Context, Poll}; -use embassy::traits::gpio::{WaitForHigh, WaitForLow}; use embassy::interrupt::InterruptExt; +use embassy::traits::gpio::{WaitForHigh, WaitForLow}; use embassy::util::Signal; use crate::hal::gpio::{Input, Level, Output, Pin as GpioPin, Port}; diff --git a/embassy-stm32f4-examples/Cargo.toml b/embassy-stm32f4-examples/Cargo.toml index 3e117ecb0..16581f4fd 100644 --- a/embassy-stm32f4-examples/Cargo.toml +++ b/embassy-stm32f4-examples/Cargo.toml @@ -18,6 +18,7 @@ defmt-error = [] [dependencies] embassy = { version = "0.1.0", path = "../embassy", features = ["defmt", "defmt-trace"] } +embassy-traits = { version = "0.1.0", path = "../embassy-traits", features = ["defmt"] } embassy-stm32f4 = { version = "*", path = "../embassy-stm32f4", features = ["stm32f401"] } defmt = "0.2.0" diff --git a/embassy-traits/Cargo.toml b/embassy-traits/Cargo.toml index 09db74ab9..626bf9f3a 100644 --- a/embassy-traits/Cargo.toml +++ b/embassy-traits/Cargo.toml @@ -4,14 +4,8 @@ version = "0.1.0" authors = ["Dario Nieuwenhuis "] edition = "2018" -[dependencies] -defmt = { version = "0.2.0", optional = true } - [features] std = [] -defmt-trace = [] -defmt-debug = [] -defmt-info = [] -defmt-warn = [] -defmt-error = [] \ No newline at end of file +[dependencies] +defmt = { version = "0.2.0", optional = true } diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index 116ab2245..1b8e2a075 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml @@ -6,12 +6,12 @@ edition = "2018" [features] std = ["futures/std", "embassy-traits/std"] -defmt = ["embassy-traits/defmt", "dep:defmt"] -defmt-trace = ["embassy-traits/defmt-trace"] -defmt-debug = ["embassy-traits/defmt-debug"] -defmt-info = ["embassy-traits/defmt-info"] -defmt-warn = ["embassy-traits/defmt-warn"] -defmt-error = ["embassy-traits/defmt-error"] + +defmt-trace = [] +defmt-debug = [] +defmt-info = [] +defmt-warn = [] +defmt-error = [] [dependencies] defmt = { version = "0.2.0", optional = true }