Merge pull request #389 from rust-embedded/remove-spin

Minor cleanups
This commit is contained in:
Dario Nieuwenhuis 2023-10-20 22:34:40 +00:00 committed by GitHub
commit 357f82cb62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 38 deletions

View File

@ -42,32 +42,13 @@ atomic-polyfill = { version = "1.0.1", optional = true }
[dependencies]
hash32 = "0.3.0"
serde = { version = "1", optional = true, default-features = false }
stable_deref_trait = { version = "1", default-features = false }
ufmt-write = { version = "0.1", optional = true }
defmt = { version = ">=0.2.0,<0.4", optional = true }
[target.'cfg(target_arch = "x86_64")'.dependencies]
spin = "0.9.4"
[dependencies.serde]
version = "1"
optional = true
default-features = false
[dependencies.stable_deref_trait]
version = "1"
default-features = false
[dependencies.ufmt-write]
version = "0.1"
optional = true
[dev-dependencies.ufmt]
version = "0.1"
[dependencies.defmt]
version = ">=0.2.0,<0.4"
optional = true
[build-dependencies]
rustc_version = "0.4.0"
[dev-dependencies]
ufmt = { version = "0.1" }
[package.metadata.docs.rs]
all-features = true

View File

@ -8,8 +8,6 @@ use std::{
process::{Command, ExitStatus, Stdio},
};
use rustc_version::Channel;
fn main() -> Result<(), Box<dyn Error>> {
let target = env::var("TARGET")?;
@ -90,13 +88,6 @@ fn main() -> Result<(), Box<dyn Error>> {
}
}
if !matches!(
rustc_version::version_meta().unwrap().channel,
Channel::Stable | Channel::Beta
) {
println!("cargo:rustc-cfg=unstable_channel");
}
match compile_probe(ARM_LLSC_PROBE) {
Some(status) if status.success() => println!("cargo:rustc-cfg=arm_llsc"),
_ => {}

View File

@ -50,7 +50,6 @@ fn twice() {
}
#[test]
#[cfg(unstable_channel)]
fn scoped() {
let mut rb: spsc::Queue<i32, 5> = spsc::Queue::new();
@ -75,7 +74,6 @@ fn scoped() {
#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn contention() {
const N: usize = 1024;
@ -121,7 +119,6 @@ fn contention() {
#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn mpmc_contention() {
use std::sync::mpsc;
@ -172,7 +169,6 @@ fn mpmc_contention() {
#[test]
#[cfg_attr(miri, ignore)] // too slow
#[cfg(unstable_channel)]
fn unchecked() {
const N: usize = 1024;