Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: matklad/once_cell
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.18.0
Choose a base ref
...
head repository: matklad/once_cell
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.19.0
Choose a head ref
  • 13 commits
  • 7 files changed
  • 4 contributors

Commits on Jun 4, 2023

  1. update readme

    matklad committed Jun 4, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    448922c View commit details
  2. Merge #241

    241: update readme r=matklad a=matklad
    
    bors r+
    
    Co-authored-by: Alex Kladov <[email protected]>
    bors[bot] and matklad authored Jun 4, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    93a98c7 View commit details

Commits on Jun 23, 2023

  1. remove mention of incorrect msrv

    No need to specify it in the docs now, as we have first-class field in
    Cargo.toml these days.
    matklad committed Jun 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    5340e1d View commit details

Commits on Jul 14, 2023

  1. Copy the full SHA
    a2eabc9 View commit details
  2. Merge #245

    245: Add `--generate-link-to-definition` option when building on docs.rs r=matklad a=GuillaumeGomez
    
    This option generates links in source code pages, allowing to jump to definition and to jump back to doc. It makes browsing the source code pages much nicer. You can see it in action [here](https://doc.rust-lang.org/stable/nightly-rustc/src/rustc_middle/lib.rs.html#90).
    
    Co-authored-by: Guillaume Gomez <[email protected]>
    bors[bot] and GuillaumeGomez authored Jul 14, 2023
    Copy the full SHA
    3cd6549 View commit details

Commits on Aug 21, 2023

  1. Copy the full SHA
    874f937 View commit details

Commits on Nov 18, 2023

  1. Copy the full SHA
    5f88676 View commit details

Commits on Dec 7, 2023

  1. Fix CI

    taks committed Dec 7, 2023
    Copy the full SHA
    e26736f View commit details
  2. Revert atomic-polyfill feature

    taks committed Dec 7, 2023
    Copy the full SHA
    de4cd9d View commit details
  3. Fix CI

    taks committed Dec 7, 2023
    Copy the full SHA
    dffcae4 View commit details
  4. v1.19.0

    taks committed Dec 7, 2023
    Copy the full SHA
    2715aa9 View commit details
  5. Fix CI

    taks committed Dec 7, 2023
    Copy the full SHA
    8211d80 View commit details
  6. Merge pull request #251 from taks/portable-atomic

    Use `portable_atomic` instead of `atomic-polyfill`
    matklad authored Dec 7, 2023
    Copy the full SHA
    c48d3c2 View commit details
Showing with 24 additions and 25 deletions.
  1. +4 −0 CHANGELOG.md
  2. +8 −11 Cargo.lock.msrv
  3. +4 −3 Cargo.toml
  4. +1 −2 README.md
  5. +1 −1 src/imp_cs.rs
  6. +5 −7 src/lib.rs
  7. +1 −1 src/race.rs
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -4,6 +4,10 @@

-

## 1.19.0

- Use `portable-atomic` instead of `atomic-polyfill`, [#251](https://github.com/matklad/once_cell/pull/251).

## 1.18.0

- `MSRV` is updated to 1.60.0 to take advantage of `dep:` syntax for cargo features,
19 changes: 8 additions & 11 deletions Cargo.lock.msrv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "once_cell"
version = "1.18.0"
version = "1.19.0"
authors = ["Aleksey Kladov <aleksey.kladov@gmail.com>"]
license = "MIT OR Apache-2.0"
edition = "2021"
@@ -21,7 +21,7 @@ members = ["xtask"]

[dependencies]
parking_lot_core = { version = "0.9.3", optional = true, default_features = false }
atomic-polyfill = { version = "1", optional = true }
portable-atomic = { version = "1", optional = true }
critical-section = { version = "1", optional = true }

[dev-dependencies]
@@ -48,7 +48,7 @@ parking_lot = ["dep:parking_lot_core"]
# Uses `critical-section` to implement `sync` and `race` modules. in
# `#![no_std]` mode. Please read `critical-section` docs carefully
# before enabling this feature.
critical-section = ["dep:critical-section", "dep:atomic-polyfill" ]
critical-section = ["dep:critical-section", "portable-atomic" ]

# Enables semver-exempt APIs of this crate.
# At the moment, this feature is unused.
@@ -83,3 +83,4 @@ required-features = ["std"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--generate-link-to-definition"]
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -54,5 +54,4 @@ More patterns and use-cases are in the [docs](https://docs.rs/once_cell/)!
* [async_once_cell](https://crates.io/crates/async_once_cell)
* [generic_once_cell](https://crates.io/crates/generic_once_cell) (bring your own mutex)

The API of `once_cell` is being proposed for inclusion in
[`std`](https://github.com/rust-lang/rfcs/pull/2788).
Parts of `once_cell` API are included into `std` [as of Rust 1.70.0](https://github.com/rust-lang/rust/pull/105587).
2 changes: 1 addition & 1 deletion src/imp_cs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use core::panic::{RefUnwindSafe, UnwindSafe};

use atomic_polyfill::{AtomicBool, Ordering};
use portable_atomic::{AtomicBool, Ordering};
use critical_section::{CriticalSection, Mutex};

use crate::unsync;
12 changes: 5 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -275,13 +275,11 @@
//!
//! # Minimum Supported `rustc` Version
//!
//! This crate's minimum supported `rustc` version is `1.56.0`.
//!
//! If only the `std` feature is enabled, MSRV will be updated conservatively,
//! supporting at least latest 8 versions of the compiler. When using other
//! features, like `parking_lot`, MSRV might be updated more frequently, up to
//! the latest stable. In both cases, increasing MSRV is *not* considered a
//! semver-breaking change.
//! If only the `std`, `alloc`, or `race` features are enabled, MSRV will be
//! updated conservatively, supporting at least latest 8 versions of the compiler.
//! When using other features, like `parking_lot`, MSRV might be updated more
//! frequently, up to the latest stable. In both cases, increasing MSRV is *not*
//! considered a semver-breaking change and requires only a minor version bump.
//!
//! # Implementation details
//!
2 changes: 1 addition & 1 deletion src/race.rs
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@
//! architectures versus `Relaxed`.
#[cfg(feature = "critical-section")]
use atomic_polyfill as atomic;
use portable_atomic as atomic;
#[cfg(not(feature = "critical-section"))]
use core::sync::atomic;