Skip to content

Stabilize std::convert and related code - #23875

Merged
bors merged 1 commit into
rust-lang:masterfrom
aturon:revise-convert-2
Apr 1, 2015
Merged

Stabilize std::convert and related code#23875
bors merged 1 commit into
rust-lang:masterfrom
aturon:revise-convert-2

Conversation

@aturon

Copy link
Copy Markdown
Contributor
  • Marks #[stable] the contents of the std::convert module.
  • Added methods PathBuf::as_path, OsString::as_os_str,
    String::as_str, Vec::{as_slice, as_mut_slice}.
  • Deprecates OsStr::from_str in favor of a new, stable, and more
    general OsStr::new.
  • Adds unstable methods OsString::from_bytes and OsStr::{to_bytes, to_cstring} for ergonomic FFI usage.

[breaking-change]

r? @alexcrichton

Comment threadsrc/libcollections/vec.rs Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary, right? If we only intend to call this as a method it should be callable through an inherent method on [T]?

@aturon
aturonforce-pushed the revise-convert-2 branch 2 times, most recently from 4c52255 to 244c7e7CompareMarch 30, 2015 23:40
@alexcrichton

Copy link
Copy Markdown
Member

r=me with an unstable as_os_str and as_path function

* Marks `#[stable]` the contents of the `std::convert` module.
* Added methods `PathBuf::as_path`, `OsString::as_os_str`,
`String::as_str`, `Vec::{as_slice, as_mut_slice}`.
* Deprecates `OsStr::from_str` in favor of a new, stable, and more
general `OsStr::new`.
* Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
to_cstring}` for ergonomic FFI usage.
[breaking-change]
@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+ 9fc51ef

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Mar 31, 2015
* Marks `#[stable]` the contents of the `std::convert` module.
* Added methods `PathBuf::as_path`, `OsString::as_os_str`,
`String::as_str`, `Vec::{as_slice, as_mut_slice}`.
* Deprecates `OsStr::from_str` in favor of a new, stable, and more
general `OsStr::new`.
* Adds unstable methods `OsString::from_bytes` and `OsStr::{to_bytes,
to_cstring}` for ergonomic FFI usage.
[breaking-change]
r? @alexcrichton
@bors
bors merged commit 9fc51ef into rust-lang:masterApr 1, 2015
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@aturon@alexcrichton@bors