From 1c87c0e69a671e2e73d8d3a71d2f88b2d30d70b4 Mon Sep 17 00:00:00 2001 From: James Bornholt Date: Thu, 27 Oct 2022 10:44:50 -0500 Subject: [PATCH] Remove `ansi_term` and release v0.4.0 (#83) --- CHANGELOG.md | 4 ++++ Cargo.toml | 4 ++-- src/sync/atomic/mod.rs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f6213e..393b2abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.4.0 (September 30, 2022) + +* Depdendency updates + # 0.3.0 (August 29, 2022) Note that clients using async primitives provided by Shuttle (task `spawn`, `block_on`, `yield_now`) will diff --git a/Cargo.toml b/Cargo.toml index 5a9b1229..0c4038a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "shuttle" -version = "0.3.0" +version = "0.4.0" edition = "2021" license = "Apache-2.0" description = "A library for testing concurrent Rust code" @@ -9,10 +9,10 @@ keywords = ["concurrency", "lock", "thread", "async"] categories = ["asynchronous", "concurrency", "development-tools::testing"] [dependencies] -ansi_term = "0.12.1" bitvec = "1.0.1" generator = "0.7.1" hex = "0.4.2" +owo-colors = "3.5.0" rand_core = "0.5.1" rand = "0.7.3" rand_pcg = "0.2.1" diff --git a/src/sync/atomic/mod.rs b/src/sync/atomic/mod.rs index 7001393d..c969282d 100644 --- a/src/sync/atomic/mod.rs +++ b/src/sync/atomic/mod.rs @@ -69,7 +69,7 @@ static PRINTED_ORDERING_WARNING: std::sync::atomic::AtomicBool = std::sync::atom #[inline] fn maybe_warn_about_ordering(order: Ordering) { - use ansi_term::Colour; + use owo_colors::OwoColorize; #[allow(clippy::collapsible_if)] if order != Ordering::SeqCst { @@ -90,7 +90,7 @@ fn maybe_warn_about_ordering(order: Ordering) { as if they were SeqCst. Bugs caused by weaker orderings like {:?} may be missed. \ See https://docs.rs/shuttle/*/shuttle/sync/atomic/index.html#warning-about-relaxed-behaviors \ for details or to disable this warning.", - Colour::Yellow.normal().paint("WARNING"), + "WARNING".yellow(), order ); }