-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Impl TryFrom<Vec<u8>> for String #132268
Impl TryFrom<Vec<u8>> for String #132268
Conversation
r? lips-api |
Failed to set assignee to
|
... |
In general, libs-api tends to be wary of implementations for
Usually libs-api has been happy to add implementations of obviously-missing traits in general, though, especially on traits which aren't as... open-ended. Things like missing Iterator extension traits on iterators, for example. And the impact of a new implementation can always be evaluated via crater runs, though those require careful reading. |
@workingjubilee Hmm I see, I'll say that the "open-ended" ones are the ones I miss the most, for example I've been using |
This makes sense since we already have @rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
This does need a crater run though. @bors try |
Impl TryFrom<Vec<u8>> for String I think this is useful enough to have :) As a general question, is there any policy around adding "missing" trait implementations? (like adding `AsRef<T> for T` for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (`foo: impl Into<String>`)
☀️ Try build successful - checks-actions |
@craterbot check |
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
@craterbot cancel Crater is currently bugging out and running at 155% completed on another job. I'm gonna clear the queue and re-queue all the jobs in order. |
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
🔔 This is now entering its final comment period, as per the review above. 🔔 |
It's not obvious to me that this follows in this case, since once could expect Can you say when you'd encourage people to use this over |
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. This will be merged soon. |
If you depend on code that already requires a generic I can’t come up with a simple example where you have to have a TryFrom impl, but I’ve run into it before in generic-heavy code like tokio Services, and other generic component architectures. |
@bors r+ |
…nieu Impl TryFrom<Vec<u8>> for String I think this is useful enough to have :) As a general question, is there any policy around adding "missing" trait implementations? (like adding `AsRef<T> for T` for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (`foo: impl Into<String>`)
…nieu Impl TryFrom<Vec<u8>> for String I think this is useful enough to have :) As a general question, is there any policy around adding "missing" trait implementations? (like adding `AsRef<T> for T` for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (`foo: impl Into<String>`)
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#127793 (Added project-specific Zed IDE settings) - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String) - rust-lang#134995 (Stabilize const_slice_flatten) - rust-lang#136985 (Do not ignore uninhabited types for function-call ABI purposes. (Remove BackendRepr::Uninhabited)) - rust-lang#137155 (Organize `OsString`/`OsStr` shims) - rust-lang#137227 (docs(dev): Update the feature-gate instructions) r? `@ghost` `@rustbot` modify labels: rollup
…nieu Impl TryFrom<Vec<u8>> for String I think this is useful enough to have :) As a general question, is there any policy around adding "missing" trait implementations? (like adding `AsRef<T> for T` for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (`foo: impl Into<String>`)
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants) - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String) - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates) - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.) - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls) - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell) - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls) - rust-lang#137155 (Organize `OsString`/`OsStr` shims) - rust-lang#137225 (vectorcall ABI: require SSE2) Failed merges: - rust-lang#136780 (std: move stdio to `sys`) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#120580 (Add `MAX_LEN_UTF8` and `MAX_LEN_UTF16` Constants) - rust-lang#132268 (Impl TryFrom<Vec<u8>> for String) - rust-lang#136093 (Match Ergonomics 2024: update old-edition behavior of feature gates) - rust-lang#136344 (Suggest replacing `.` with `::` in more error diagnostics.) - rust-lang#136690 (Use more explicit and reliable ptr select in sort impls) - rust-lang#136815 (CI: Stop /msys64/bin from being prepended to PATH in msys2 shell) - rust-lang#136923 (Lint `#[must_use]` attributes applied to methods in trait impls) - rust-lang#137155 (Organize `OsString`/`OsStr` shims) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132268 - elichai:string_try_from_vec, r=Amanieu Impl TryFrom<Vec<u8>> for String I think this is useful enough to have :) As a general question, is there any policy around adding "missing" trait implementations? (like adding `AsRef<T> for T` for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (`foo: impl Into<String>`)
I think this is useful enough to have :)
As a general question, is there any policy around adding "missing" trait implementations? (like adding
AsRef<T> for T
for std types), I mostly stumble upon them when using a lot of "impl Trait in argument position" like (foo: impl Into<String>
)