Skip to content

Commit

Permalink
Deprecate Box::freeze, prepare v0.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
korken89 committed Jul 1, 2021
1 parent 1d502c0 commit 01f16f1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.7.3] - 2021-07-1

### Changed

- `Box::freeze` is deprecated due to possibility of undefined behavior.

## [v0.7.2] - 2021-06-30

### Added
Expand Down Expand Up @@ -365,7 +371,8 @@ architecture.

- Initial release

[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.2...HEAD
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.3...HEAD
[v0.7.3]: https://github.com/japaric/heapless/compare/v0.7.2...v0.7.3
[v0.7.2]: https://github.com/japaric/heapless/compare/v0.7.1...v0.7.2
[v0.7.1]: https://github.com/japaric/heapless/compare/v0.7.0...v0.7.1
[v0.7.0]: https://github.com/japaric/heapless/compare/v0.6.1...v0.7.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -12,7 +12,7 @@ keywords = ["static", "no-heap"]
license = "MIT OR Apache-2.0"
name = "heapless"
repository = "https://github.com/japaric/heapless"
version = "0.7.2"
version = "0.7.3"

[features]
default = ["cas"]
Expand Down
6 changes: 5 additions & 1 deletion src/pool/singleton.rs
Expand Up @@ -123,7 +123,11 @@ where
P: Pool,
P::Data: AsRef<[u8]>,
{
/// Freezes the contents of this memory block
#[deprecated(
since = "0.7.3",
note = "This can access uninitialized memory, use `init(..)` instead (https://github.com/japaric/heapless/issues/212)"
)]
/// (DO NOT USE, SEE DEPRECATION) Freezes the contents of this memory block
///
/// See [rust-lang/rust#58363](https://github.com/rust-lang/rust/pull/58363) for details.
pub fn freeze(self) -> Box<P, Init> {
Expand Down
2 changes: 1 addition & 1 deletion src/spsc.rs
@@ -1,6 +1,6 @@
//! Fixed capacity Single Producer Single Consumer (SPSC) queue
//!
//! Implementation based on https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular
//! Implementation based on <https://www.codeproject.com/Articles/43510/Lock-Free-Single-Producer-Single-Consumer-Circular>
//!
//! NOTE: This module is not available on targets that do *not* support atomic loads, e.g. RISC-V
//! cores w/o the A (Atomic) extension
Expand Down

0 comments on commit 01f16f1

Please sign in to comment.