diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e50dd9..666ae9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: - nightly - beta - stable - - 1.56.1 # MSRV + - 1.59.0 # MSRV timeout-minutes: 10 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e5e86b..78ee40d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Unreleased + +* Increase MSRV to 1.59.0 because of `rayon-core v1.11.0`. + ## 0.14.1 (2022-07-14) * Undo performance regression from removing `hashbrown` by using `ahash` hasher diff --git a/Cargo.toml b/Cargo.toml index 1c99a8d..a06977e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ categories = ["concurrency"] license = "MIT OR Apache-2.0" exclude = ["bors.toml", ".travis.yml"] edition = "2021" -rust-version = "1.56.1" +rust-version = "1.59.0" [dependencies] ahash = "0.7.6" diff --git a/src/cell.rs b/src/cell.rs index 34d716d..469cd9a 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -5,7 +5,7 @@ use core::ptr::NonNull; use std::{ cell::UnsafeCell, error::Error, - fmt::{Display, Error as FormatError, Formatter}, + fmt::{Debug, Display, Error as FormatError, Formatter}, ops::{Deref, DerefMut}, sync::atomic::{AtomicUsize, Ordering}, usize, @@ -41,7 +41,6 @@ impl Error for InvalidBorrow { /// An immutable reference to data in a `TrustCell`. /// /// Access the value via `std::ops::Deref` (e.g. `*val`) -#[derive(Debug)] pub struct Ref<'a, T: ?Sized + 'a> { flag: &'a AtomicUsize, value: NonNull, @@ -135,10 +134,15 @@ impl<'a, T: ?Sized> Clone for Ref<'a, T> { } } +impl<'a, T: ?Sized + Debug> Debug for Ref<'a, T> { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FormatError> { + ::fmt(self, f) + } +} + /// A mutable reference to data in a `TrustCell`. /// /// Access the value via `std::ops::DerefMut` (e.g. `*val`) -#[derive(Debug)] pub struct RefMut<'a, T: ?Sized + 'a> { flag: &'a AtomicUsize, value: NonNull, @@ -245,6 +249,12 @@ impl<'a, T: ?Sized> Drop for RefMut<'a, T> { } } +impl<'a, T: ?Sized + Debug> Debug for RefMut<'a, T> { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), FormatError> { + ::fmt(self, f) + } +} + /// A custom cell container that is a `RefCell` with thread-safety. #[derive(Debug)] pub struct TrustCell {