-
-
Notifications
You must be signed in to change notification settings - Fork 338
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
feat(List)!: new
now accepts IntoIterator<Item = Into<ListItem>>
#672
Conversation
a57d0fe
to
1ea178d
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
=======================================
- Coverage 90.9% 90.9% -0.1%
=======================================
Files 42 42
Lines 12612 12671 +59
=======================================
+ Hits 11469 11519 +50
- Misses 1143 1152 +9 ☔ View full report in Codecov by Sentry. |
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.
I think this breaks things in a good way (i.e. on an empty list of items with indeterminate type), so we can probably take it in the next major (0.25.0).
Needs a couple more things:
- some tests to show it works for a few of the assorted types.
- an entry in the breaking changes doc to explain how old code will fail (and corresponding changelog message in the commit
Let's also add an items()
method so that List::default().items(...)
works. What do you think?
Let's go for 0.25 then, it shouldn't really break any code anyway since there weren't an
Agree, so it lines up with table once #638 is merged |
1ea178d
to
aff61c9
Compare
Should be all good now. Hope the commit message is good enough, took inspiration from this one 37c70db |
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.
LGTM - the must_use fix should probably be added before merging this though.
aff61c9
to
8a07ae2
Compare
…em>>` This allows to build list like ``` List::new(["Item 1", "Item 2"]) ``` BREAKING CHANGE: `List::new` parameter type changed from `Into<Vec<ListItem<'a>>>` to `IntoIterator<Item = Into<ListItem<'a>>>`
8a07ae2
to
511c86d
Compare
I also fixed some typos and missing links in the breaking-change file. Weird that |
This allows to build list like
Fixes #670
I think this should be added for 0.26 to not add too much breaking change for 0.25. Moreover there's another breaking change for list coming with #671. It makes sense to release them together.