-
Notifications
You must be signed in to change notification settings - Fork 208
Make LenType opt-in #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Make LenType opt-in #569
Conversation
We can also add back some new type aliases that use the |
Wait, maybe a release should not be made with just that. 0.9.0 was missing multiple wanted breaking changes: #494 |
To consider merging before this: |
2f6e693
to
840c7a7
Compare
I think the idea was that 0.9.0 has waited already very long and any more breaking changes should go into the next breaking release (perhaps 1.0). |
Cargo.toml
Outdated
@@ -12,7 +12,7 @@ keywords = ["static", "no-heap"] | |||
license = "MIT OR Apache-2.0" | |||
name = "heapless" | |||
repository = "https://github.com/rust-embedded/heapless" | |||
version = "0.9.0" | |||
version = "0.9.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this into a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved into #574
840c7a7
to
2b99570
Compare
b947a5b
to
923847d
Compare
These breaking changes were not made part of the addition of the See #529 (comment) |
Ah ok. Thanks for explaining. 👍
Cool. I just hope that they're easy to review/merge and won't delay 0.9.1. |
CHANGELOG.md
Outdated
@@ -18,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |||
### Removed | |||
|
|||
- Removed invalid `bytes::Buf` implementation. | |||
- Removed `DefaultLenType` struct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Removed `DefaultLenType` struct | |
- Removed `DefaultLenType` struct. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
923847d
to
7679751
Compare
src/vec/mod.rs
Outdated
@@ -1806,7 +1805,7 @@ mod tests { | |||
{ | |||
let v: Vec<Droppable, 2> = Vec::new(); | |||
let v: Box<Vec<Droppable, 2>> = Box::new(v); | |||
let mut v: Box<VecView<Droppable, u8>> = v; | |||
let mut v: Box<VecView<Droppable, usize>> = v; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now redundant, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
See #568
This makes
LenType
all default tousize
and prepares for a 0.9.1 release (assuming you chose to yank 0.9.0, as I suggested)Regarding
SortedLinkedList
:Before https://github.com/rust-embedded/heapless/pull/553/files it was already using and
Idx
type for the same optimization. The PR only added theDefaultLenType
, but all previous code needed to make the type explicit. I think it might be fine to leave it there and not default to usize (but at the cost of having everyone needing to re-order the generics in their types).