mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-24 15:52:34 +00:00
Merge pull request #3402 from sourcebox/sync-additions
embassy-sync: documentation and clippy fixes
This commit is contained in:
commit
9555259c57
@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
- Add LazyLock sync primitive.
|
- Add `LazyLock` sync primitive.
|
||||||
|
- Add `Watch` sync primitive.
|
||||||
- Add `clear`, `len`, `is_empty` and `is_full` functions to `zerocopy_channel`.
|
- Add `clear`, `len`, `is_empty` and `is_full` functions to `zerocopy_channel`.
|
||||||
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `channel::{Sender, Receiver}`.
|
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `channel::{Sender, Receiver}`.
|
||||||
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `priority_channel::{Sender, Receiver}`.
|
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `priority_channel::{Sender, Receiver}`.
|
||||||
@ -19,20 +20,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `PubSubChannel`.
|
- Add `capacity`, `free_capacity`, `clear`, `len`, `is_empty` and `is_full` functions to `PubSubChannel`.
|
||||||
- Made `PubSubBehavior` sealed
|
- Made `PubSubBehavior` sealed
|
||||||
- If you called `.publish_immediate(...)` on the queue directly before, then now call `.immediate_publisher().publish_immediate(...)`
|
- If you called `.publish_immediate(...)` on the queue directly before, then now call `.immediate_publisher().publish_immediate(...)`
|
||||||
- Add OnceLock sync primitive.
|
- Add `OnceLock` sync primitive.
|
||||||
- Add constructor for DynamicChannel
|
- Add constructor for `DynamicChannel`
|
||||||
- Add ready_to_receive functions to Channel and Receiver.
|
- Add ready_to_receive functions to `Channel` and `Receiver`.
|
||||||
|
|
||||||
## 0.5.0 - 2023-12-04
|
## 0.5.0 - 2023-12-04
|
||||||
|
|
||||||
- Add a PriorityChannel.
|
- Add a `PriorityChannel`.
|
||||||
- Remove nightly and unstable-traits features in preparation for 1.75.
|
- Remove `nightly` and `unstable-traits` features in preparation for 1.75.
|
||||||
- Upgrade heapless to 0.8.
|
- Upgrade `heapless` to 0.8.
|
||||||
- Upgrade static-cell to 2.0.
|
- Upgrade `static-cell` to 2.0.
|
||||||
|
|
||||||
## 0.4.0 - 2023-10-31
|
## 0.4.0 - 2023-10-31
|
||||||
|
|
||||||
- Re-add impl_trait_projections
|
- Re-add `impl_trait_projections`
|
||||||
- switch to `embedded-io 0.6`
|
- switch to `embedded-io 0.6`
|
||||||
|
|
||||||
## 0.3.0 - 2023-09-14
|
## 0.3.0 - 2023-09-14
|
||||||
|
@ -104,6 +104,7 @@ impl<T> Mutex<raw::CriticalSectionRawMutex, T> {
|
|||||||
|
|
||||||
impl<T> Mutex<raw::NoopRawMutex, T> {
|
impl<T> Mutex<raw::NoopRawMutex, T> {
|
||||||
/// Borrows the data
|
/// Borrows the data
|
||||||
|
#[allow(clippy::should_implement_trait)]
|
||||||
pub fn borrow(&self) -> &T {
|
pub fn borrow(&self) -> &T {
|
||||||
let ptr = self.data.get() as *const T;
|
let ptr = self.data.get() as *const T;
|
||||||
unsafe { &*ptr }
|
unsafe { &*ptr }
|
||||||
|
@ -138,7 +138,7 @@ impl<M: RawMutex, T> From<T> for Mutex<M, T> {
|
|||||||
impl<M, T> Default for Mutex<M, T>
|
impl<M, T> Default for Mutex<M, T>
|
||||||
where
|
where
|
||||||
M: RawMutex,
|
M: RawMutex,
|
||||||
T: ?Sized + Default,
|
T: Default,
|
||||||
{
|
{
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(Default::default())
|
Self::new(Default::default())
|
||||||
|
Loading…
Reference in New Issue
Block a user