rust/library/std
Matthias Krüger 4efdb5c001
Rollup merge of #98202 - aticu:impl_tryfrom_osstr_for_str, r=Amanieu
Implement `TryFrom<&OsStr>` for `&str`

Recently when trying to work with `&OsStr` I was surprised to find this `impl` missing.

Since the `to_str` method already existed the actual implementation is fairly non-controversial, except for maybe the choice of the error type. I chose an opaque error here instead of something like `std::str::Utf8Error`, since that would already make a number of assumption about the underlying implementation of `OsStr`.

As this is a trait implementation, it is insta-stable, if I'm not mistaken?
Either way this will need an FCP.
I chose "1.64.0" as the version, since this is unlikely to land before the beta cut-off.

`@rustbot` modify labels: +T-libs-api

API Change Proposal: rust-lang/rust#99031 (accepted)
2023-06-14 18:10:27 +02:00
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Rollup merge of #98202 - aticu:impl_tryfrom_osstr_for_str, r=Amanieu 2023-06-14 18:10:27 +02:00
tests std: mark common functions in test crate pub(crate) 2023-05-25 08:15:04 -07:00
build.rs PS Vita std support 2023-05-07 18:57:43 +03:00
Cargo.toml Bumped libc version 2023-06-06 16:09:05 +03:00