Skip to content

Commit f692384

Browse files
authored
Merge pull request #443 from reitermarkus/const-split
Make `Queue::split` `const`.
2 parents 717c7b1 + 91d0e83 commit f692384

File tree

4 files changed

+203
-65
lines changed

4 files changed

+203
-65
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
9696
- The `MpMcQueue` type has been renamed to `Queue`.
9797
- The `MpMcQueueView` type has been renamed to `QueueView`.
9898
- The `MpMcQueueInner` type has been renamed to `QueueInner`.
99+
- Changed `Queue::split` to be `const`.
99100

100101
### Fixed
101102

Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ defmt = { version = "1.0.1", optional = true }
6060
stable_deref_trait = { version = "1", default-features = false }
6161

6262
[dev-dependencies]
63+
critical-section = { version = "1.1", features = ["std"] }
6364
static_assertions = "1.1.0"
6465

6566
[package.metadata.docs.rs]

src/lib.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
)
5959
)
6060
),
61-
doc = "- [Arc][pool::arc::Arc] -- like `std::sync::Arc` but backed by a lock-free memory pool rather than [global_allocator]"
61+
doc = "- [`Arc`][pool::arc::Arc]: Like `std::sync::Arc` but backed by a lock-free memory pool rather than `[global_allocator]`."
6262
)]
6363
#![cfg_attr(
6464
any(
@@ -75,7 +75,7 @@
7575
)
7676
)
7777
),
78-
doc = "- [Box][pool::boxed::Box] -- like `std::boxed::Box` but backed by a lock-free memory pool rather than [global_allocator]"
78+
doc = "- [`Box`][pool::boxed::Box]: Like `std::boxed::Box` but backed by a lock-free memory pool rather than `[global_allocator]`."
7979
)]
8080
#![cfg_attr(
8181
any(
@@ -92,7 +92,7 @@
9292
)
9393
)
9494
),
95-
doc = "- [Arc][pool::arc::Arc] -- like `std::sync::Arc` but backed by a lock-free memory pool rather than [global_allocator]"
95+
doc = "- [`Arc`][pool::arc::Arc]: Like `std::sync::Arc` but backed by a lock-free memory pool rather than `[global_allocator]`."
9696
)]
9797
#![cfg_attr(
9898
any(
@@ -109,19 +109,19 @@
109109
)
110110
)
111111
),
112-
doc = "- [Object](pool::object::Object) -- objects managed by an object pool"
112+
doc = "- [`Object`](pool::object::Object): Objects managed by an object pool."
113113
)]
114-
//! - [`BinaryHeap`] -- priority queue
115-
//! - [Deque] -- double-ended queue
116-
//! - [`HistoryBuf`] -- similar to a write-only ring buffer
117-
//! - [`IndexMap`] -- hash table
118-
//! - [`IndexSet`] -- hash set
119-
//! - [`LinearMap`]
120-
//! - [`sorted_linked_list::SortedLinkedList`]
121-
//! - [String]
122-
//! - [Vec]
123-
//! - [`mpmc::Q*`](mpmc) -- multiple producer multiple consumer lock-free queue
124-
//! - [spsc] and [`spsc::Queue`] -- single producer single consumer lock-free queue
114+
//! - [`BinaryHeap`]: A priority queue.
115+
//! - [`Deque`]: A double-ended queue.
116+
//! - [`HistoryBuf`]: A “history buffer”, similar to a write-only ring buffer.
117+
//! - [`IndexMap`]: A hash table.
118+
//! - [`IndexSet`]: A hash set.
119+
//! - [`LinearMap`]: A linear map.
120+
//! - [`SortedLinkedList`](sorted_linked_list::SortedLinkedList): A sorted linked list.
121+
//! - [`String`]: A string.
122+
//! - [`Vec`]: A vector.
123+
//! - [`mpmc::MpMcQueue`](mpmc): A lock-free multiple-producer, multiple-consumer queue.
124+
//! - [`spsc::Queue`](spsc): A lock-free single-producer, single-consumer queue.
125125
//!
126126
//! # Minimum Supported Rust Version (MSRV)
127127
//!

0 commit comments

Comments
 (0)