Skip to content

Commit 25a3a5a

Browse files
committed
Merge branch 'main' into histbuf-api-additions
2 parents a33989f + c7c731d commit 25a3a5a

33 files changed

+1099
-737
lines changed

.github/workflows/build.yml

Lines changed: 99 additions & 114 deletions
Large diffs are not rendered by default.

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout sources
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v4
2020

2121
- name: Check that changelog updated
2222
uses: dangoslen/changelog-enforcer@v3

CHANGELOG.md

Lines changed: 94 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
99

1010
### Added
1111

12+
- Added `format` macro.
13+
14+
### Changed
15+
16+
- Changed `stable_deref_trait` to a platform-dependent dependency.
17+
18+
### Fixed
19+
20+
- Fixed clippy lints.
21+
- Fixed `{arc,box,object}_pool!` emitting clippy lints for `CamelCase` and `SNAKE_CASE`.
22+
23+
## [v0.8.0] - 2023-11-07
24+
25+
### Added
26+
1227
- Add `Clone` and `PartialEq` implementations to `HistoryBuffer`.
1328
- Added an object pool API. see the `pool::object` module level doc for details
1429
- Add `HistoryBuffer::as_slices()`
1530
- Implemented `retain` for `IndexMap` and `IndexSet`.
1631
- Recover `StableDeref` trait for `pool::object::Object` and `pool::boxed::Box`.
1732
- Add polyfills for ESP32S2
33+
- Added `String::from_utf8` and `String::from_utf8_unchecked`.
1834

1935
### Changed
2036

37+
- updated from edition 2018 to edition 2021
2138
- [breaking-change] `IndexMap` and `IndexSet` now require that keys implement the `core::hash::Hash`
2239
trait instead of the `hash32::Hash` (v0.2.0) trait
2340
- move `pool::singleton::Box` to the `pool::box` module
@@ -30,12 +47,20 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
3047
- export `IndexSet` and `IndexMap` iterator types.
3148
- [breaking-change] export `IndexMapKeys`, `IndexMapValues` and
3249
`IndexMapValuesMut` iterator types.
33-
34-
- [breaking-change] this crate now depends on `atomic-polyfill` v1.0.1, meaning that targets that
35-
require a polyfill need a `critical-section` **v1.x.x** implementation.
50+
- [breaking-change] this crate now uses `portable-atomic` v1.0 instead of `atomic-polyfill` for emulating
51+
CAS instructions on targets where they're not natively available.
52+
- [breaking-change] `From<&str>` for `String` was replaced with `TryFrom<&str>` because the `From` trait must not fail.
53+
- [breaking-change] Renamed Cargo features
54+
- `defmt-impl` is now `defmt-03`
55+
- `ufmt-impl` is now `ufmt`
56+
- `cas` is removed, atomic polyfilling is now opt-in via the `portable-atomic` feature.
57+
- `Vec::as_mut_slice` is now a public method.
3658

3759
### Fixed
3860

61+
- Fixed a `dropping_references` warning in `LinearMap`.
62+
- Fixed IndexMap entry API returning wrong slot after an insert on vacant entry. (#360)
63+
3964
### Removed
4065

4166
- [breaking-change] this crate no longer has a Minimum Supported Rust Version (MSRV) guarantee and
@@ -88,31 +113,31 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88113

89114
### Added
90115

91-
* Added support for AVR architecture.
92-
* Add `entry` API to `IndexMap`
93-
* Implement `IntoIterator` trait for `Indexmap`
94-
* Implement `FromIterator` for `String`
95-
* Add `first` and `last` methods to `IndexMap` and `IndexSet`
96-
* Add `pop_{front_back}_unchecked` methods to `Deque`
116+
- Added support for AVR architecture.
117+
- Add `entry` API to `IndexMap`
118+
- Implement `IntoIterator` trait for `Indexmap`
119+
- Implement `FromIterator` for `String`
120+
- Add `first` and `last` methods to `IndexMap` and `IndexSet`
121+
- Add `pop_{front_back}_unchecked` methods to `Deque`
97122

98123
### Changed
99124

100-
* Optimize the codegen of `Vec::clone`
101-
* `riscv32i` and `riscv32imc` targets unconditionally (e.g. `build --no-default-features`) depends on `atomic-polyfill`
125+
- Optimize the codegen of `Vec::clone`
126+
- `riscv32i` and `riscv32imc` targets unconditionally (e.g. `build --no-default-features`) depends on `atomic-polyfill`
102127

103128
### Fixed
104129

105-
* Inserting an item that replaces an already present item will no longer
106-
fail with an error
130+
- Inserting an item that replaces an already present item will no longer
131+
fail with an error
107132

108133
## [v0.7.11] - 2022-05-09
109134

110135
### Fixed
111136

112-
* Fixed `pool` example in docstring.
113-
* Fixed undefined behavior in `Vec::truncate()`, `Vec::swap_remove_unchecked()`,
137+
- Fixed `pool` example in docstring.
138+
- Fixed undefined behavior in `Vec::truncate()`, `Vec::swap_remove_unchecked()`,
114139
and `Hole::move_to()` (internal to the binary heap implementation).
115-
* Fixed `BinaryHeap` elements are being dropped twice
140+
- Fixed `BinaryHeap` elements are being dropped twice
116141

117142
## [v0.7.10] - 2022-01-21
118143

@@ -292,8 +317,8 @@ fail with an error
292317
### Added
293318

294319
- opt-out `cas` feature to disable parts of the API that use CAS instructions.
295-
Useful if using a custom (i.e. not built-in) rustc target that does not have CAS
296-
instructions.
320+
Useful if using a custom (i.e. not built-in) rustc target that does not have CAS
321+
instructions.
297322

298323
- singleton `Pool` support on ARMv7-A devices
299324

@@ -312,7 +337,7 @@ instructions.
312337
- `Pool` now implements the `Sync` trait when targeting ARMv7-R.
313338

314339
- Most data structures can now be constructed in "const context" (e.g. `static
315-
[mut]` variables) using a newtype in `heapless::i`.
340+
[mut]` variables) using a newtype in `heapless::i`.
316341

317342
- `Pool` has gained a `grow_exact` method to more efficiently use statically
318343
allocated memory.
@@ -357,7 +382,7 @@ instructions.
357382
### Added
358383

359384
- Added a memory pool that's lock-free and interrupt-safe on the ARMv7-M
360-
architecture.
385+
architecture.
361386

362387
- `IndexMap` have gained `Eq` and `PartialEq` implementations.
363388

@@ -545,56 +570,57 @@ architecture.
545570
- [breaking-change] The error type of all operations that may fail has changed from `()` to
546571
`BufferFullError`.
547572

548-
- Both `RingBuffer` and `Vec` now support arrays of *any* size for their backup storage.
573+
- Both `RingBuffer` and `Vec` now support arrays of _any_ size for their backup storage.
549574

550575
## [v0.1.0] - 2017-04-27
551576

552577
- Initial release
553578

554-
[Unreleased]: https://github.com/japaric/heapless/compare/v0.7.16...HEAD
555-
[v0.7.16]: https://github.com/japaric/heapless/compare/v0.7.15...v0.7.16
556-
[v0.7.15]: https://github.com/japaric/heapless/compare/v0.7.14...v0.7.15
557-
[v0.7.14]: https://github.com/japaric/heapless/compare/v0.7.13...v0.7.14
558-
[v0.7.13]: https://github.com/japaric/heapless/compare/v0.7.12...v0.7.13
559-
[v0.7.12]: https://github.com/japaric/heapless/compare/v0.7.11...v0.7.12
560-
[v0.7.11]: https://github.com/japaric/heapless/compare/v0.7.10...v0.7.11
561-
[v0.7.10]: https://github.com/japaric/heapless/compare/v0.7.9...v0.7.10
562-
[v0.7.9]: https://github.com/japaric/heapless/compare/v0.7.8...v0.7.9
563-
[v0.7.8]: https://github.com/japaric/heapless/compare/v0.7.7...v0.7.8
564-
[v0.7.7]: https://github.com/japaric/heapless/compare/v0.7.6...v0.7.7
565-
[v0.7.6]: https://github.com/japaric/heapless/compare/v0.7.5...v0.7.6
566-
[v0.7.5]: https://github.com/japaric/heapless/compare/v0.7.4...v0.7.5
567-
[v0.7.4]: https://github.com/japaric/heapless/compare/v0.7.3...v0.7.4
568-
[v0.7.3]: https://github.com/japaric/heapless/compare/v0.7.2...v0.7.3
569-
[v0.7.2]: https://github.com/japaric/heapless/compare/v0.7.1...v0.7.2
570-
[v0.7.1]: https://github.com/japaric/heapless/compare/v0.7.0...v0.7.1
571-
[v0.7.0]: https://github.com/japaric/heapless/compare/v0.6.1...v0.7.0
572-
[v0.6.1]: https://github.com/japaric/heapless/compare/v0.6.0...v0.6.1
573-
[v0.6.0]: https://github.com/japaric/heapless/compare/v0.5.5...v0.6.0
574-
[v0.5.5]: https://github.com/japaric/heapless/compare/v0.5.4...v0.5.5
575-
[v0.5.4]: https://github.com/japaric/heapless/compare/v0.5.3...v0.5.4
576-
[v0.5.3]: https://github.com/japaric/heapless/compare/v0.5.2...v0.5.3
577-
[v0.5.2]: https://github.com/japaric/heapless/compare/v0.5.1...v0.5.2
578-
[v0.5.1]: https://github.com/japaric/heapless/compare/v0.5.0...v0.5.1
579-
[v0.5.0]: https://github.com/japaric/heapless/compare/v0.4.4...v0.5.0
580-
[v0.4.4]: https://github.com/japaric/heapless/compare/v0.4.3...v0.4.4
581-
[v0.4.3]: https://github.com/japaric/heapless/compare/v0.4.2...v0.4.3
582-
[v0.4.2]: https://github.com/japaric/heapless/compare/v0.4.1...v0.4.2
583-
[v0.4.1]: https://github.com/japaric/heapless/compare/v0.4.0...v0.4.1
584-
[v0.4.0]: https://github.com/japaric/heapless/compare/v0.3.7...v0.4.0
585-
[v0.3.7]: https://github.com/japaric/heapless/compare/v0.3.6...v0.3.7
586-
[v0.3.6]: https://github.com/japaric/heapless/compare/v0.3.5...v0.3.6
587-
[v0.3.5]: https://github.com/japaric/heapless/compare/v0.3.4...v0.3.5
588-
[v0.3.4]: https://github.com/japaric/heapless/compare/v0.3.3...v0.3.4
589-
[v0.3.3]: https://github.com/japaric/heapless/compare/v0.3.2...v0.3.3
590-
[v0.3.2]: https://github.com/japaric/heapless/compare/v0.3.1...v0.3.2
591-
[v0.3.1]: https://github.com/japaric/heapless/compare/v0.3.0...v0.3.1
592-
[v0.3.0]: https://github.com/japaric/heapless/compare/v0.2.7...v0.3.0
593-
[v0.2.7]: https://github.com/japaric/heapless/compare/v0.2.6...v0.2.7
594-
[v0.2.6]: https://github.com/japaric/heapless/compare/v0.2.5...v0.2.6
595-
[v0.2.5]: https://github.com/japaric/heapless/compare/v0.2.4...v0.2.5
596-
[v0.2.4]: https://github.com/japaric/heapless/compare/v0.2.3...v0.2.4
597-
[v0.2.3]: https://github.com/japaric/heapless/compare/v0.2.2...v0.2.3
598-
[v0.2.2]: https://github.com/japaric/heapless/compare/v0.2.1...v0.2.2
599-
[v0.2.1]: https://github.com/japaric/heapless/compare/v0.2.0...v0.2.1
600-
[v0.2.0]: https://github.com/japaric/heapless/compare/v0.1.0...v0.2.0
579+
[Unreleased]: https://github.com/rust-embedded/heapless/compare/v0.8.0...HEAD
580+
[v0.8.0]: https://github.com/rust-embedded/heapless/compare/v0.7.16...v0.8.0
581+
[v0.7.16]: https://github.com/rust-embedded/heapless/compare/v0.7.15...v0.7.16
582+
[v0.7.15]: https://github.com/rust-embedded/heapless/compare/v0.7.14...v0.7.15
583+
[v0.7.14]: https://github.com/rust-embedded/heapless/compare/v0.7.13...v0.7.14
584+
[v0.7.13]: https://github.com/rust-embedded/heapless/compare/v0.7.12...v0.7.13
585+
[v0.7.12]: https://github.com/rust-embedded/heapless/compare/v0.7.11...v0.7.12
586+
[v0.7.11]: https://github.com/rust-embedded/heapless/compare/v0.7.10...v0.7.11
587+
[v0.7.10]: https://github.com/rust-embedded/heapless/compare/v0.7.9...v0.7.10
588+
[v0.7.9]: https://github.com/rust-embedded/heapless/compare/v0.7.8...v0.7.9
589+
[v0.7.8]: https://github.com/rust-embedded/heapless/compare/v0.7.7...v0.7.8
590+
[v0.7.7]: https://github.com/rust-embedded/heapless/compare/v0.7.6...v0.7.7
591+
[v0.7.6]: https://github.com/rust-embedded/heapless/compare/v0.7.5...v0.7.6
592+
[v0.7.5]: https://github.com/rust-embedded/heapless/compare/v0.7.4...v0.7.5
593+
[v0.7.4]: https://github.com/rust-embedded/heapless/compare/v0.7.3...v0.7.4
594+
[v0.7.3]: https://github.com/rust-embedded/heapless/compare/v0.7.2...v0.7.3
595+
[v0.7.2]: https://github.com/rust-embedded/heapless/compare/v0.7.1...v0.7.2
596+
[v0.7.1]: https://github.com/rust-embedded/heapless/compare/v0.7.0...v0.7.1
597+
[v0.7.0]: https://github.com/rust-embedded/heapless/compare/v0.6.1...v0.7.0
598+
[v0.6.1]: https://github.com/rust-embedded/heapless/compare/v0.6.0...v0.6.1
599+
[v0.6.0]: https://github.com/rust-embedded/heapless/compare/v0.5.5...v0.6.0
600+
[v0.5.5]: https://github.com/rust-embedded/heapless/compare/v0.5.4...v0.5.5
601+
[v0.5.4]: https://github.com/rust-embedded/heapless/compare/v0.5.3...v0.5.4
602+
[v0.5.3]: https://github.com/rust-embedded/heapless/compare/v0.5.2...v0.5.3
603+
[v0.5.2]: https://github.com/rust-embedded/heapless/compare/v0.5.1...v0.5.2
604+
[v0.5.1]: https://github.com/rust-embedded/heapless/compare/v0.5.0...v0.5.1
605+
[v0.5.0]: https://github.com/rust-embedded/heapless/compare/v0.4.4...v0.5.0
606+
[v0.4.4]: https://github.com/rust-embedded/heapless/compare/v0.4.3...v0.4.4
607+
[v0.4.3]: https://github.com/rust-embedded/heapless/compare/v0.4.2...v0.4.3
608+
[v0.4.2]: https://github.com/rust-embedded/heapless/compare/v0.4.1...v0.4.2
609+
[v0.4.1]: https://github.com/rust-embedded/heapless/compare/v0.4.0...v0.4.1
610+
[v0.4.0]: https://github.com/rust-embedded/heapless/compare/v0.3.7...v0.4.0
611+
[v0.3.7]: https://github.com/rust-embedded/heapless/compare/v0.3.6...v0.3.7
612+
[v0.3.6]: https://github.com/rust-embedded/heapless/compare/v0.3.5...v0.3.6
613+
[v0.3.5]: https://github.com/rust-embedded/heapless/compare/v0.3.4...v0.3.5
614+
[v0.3.4]: https://github.com/rust-embedded/heapless/compare/v0.3.3...v0.3.4
615+
[v0.3.3]: https://github.com/rust-embedded/heapless/compare/v0.3.2...v0.3.3
616+
[v0.3.2]: https://github.com/rust-embedded/heapless/compare/v0.3.1...v0.3.2
617+
[v0.3.1]: https://github.com/rust-embedded/heapless/compare/v0.3.0...v0.3.1
618+
[v0.3.0]: https://github.com/rust-embedded/heapless/compare/v0.2.7...v0.3.0
619+
[v0.2.7]: https://github.com/rust-embedded/heapless/compare/v0.2.6...v0.2.7
620+
[v0.2.6]: https://github.com/rust-embedded/heapless/compare/v0.2.5...v0.2.6
621+
[v0.2.5]: https://github.com/rust-embedded/heapless/compare/v0.2.4...v0.2.5
622+
[v0.2.4]: https://github.com/rust-embedded/heapless/compare/v0.2.3...v0.2.4
623+
[v0.2.3]: https://github.com/rust-embedded/heapless/compare/v0.2.2...v0.2.3
624+
[v0.2.2]: https://github.com/rust-embedded/heapless/compare/v0.2.1...v0.2.2
625+
[v0.2.1]: https://github.com/rust-embedded/heapless/compare/v0.2.0...v0.2.1
626+
[v0.2.0]: https://github.com/rust-embedded/heapless/compare/v0.1.0...v0.2.0

CODE_OF_CONDUCT.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# The Rust Code of Conduct
2+
3+
## Conduct
4+
5+
**Contact**: [Libs team](https://github.com/rust-embedded/wg#the-libs-team)
6+
7+
* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
8+
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
9+
* Please be kind and courteous. There's no need to be mean or rude.
10+
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
11+
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
12+
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behavior. We interpret the term "harassment" as including the definition in the [Citizen Code of Conduct](http://citizencodeofconduct.org/); if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
13+
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Libs team][team] immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
14+
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behavior is not welcome.
15+
16+
## Moderation
17+
18+
These are the policies for upholding our community's standards of conduct.
19+
20+
1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
21+
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
22+
3. Moderators will first respond to such remarks with a warning.
23+
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
24+
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
25+
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
26+
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
27+
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.
28+
29+
In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.
30+
31+
And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.
32+
33+
The enforcement policies listed above apply to all official embedded WG venues; including official IRC channels (#rust-embedded); GitHub repositories under rust-embedded; and all forums under rust-embedded.org (forum.rust-embedded.org).
34+
35+
*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](https://www.contributor-covenant.org/version/1/3/0/).*
36+
37+
[team]: https://github.com/rust-embedded/wg#the-libs-team

0 commit comments

Comments
 (0)