Skip to content

Tracking Issue for PathBuf::into_string #156203

Description

@asder8215

Feature gate: #![feature(pathbuf_into_string)]

This is a tracking issue for rust-lang/libs-team#307

Currently, to convert a PathBuf into a String, you had to first use PathBuf::into_os_string and then OsString::into_string. However, with this feature, you can convert a PathBuf directly into a String using PathBuf::into_string, allowing you to not need to write the intermediate PathBuf::into_os_string.

Public API

// use std::path::Pathbuf; 

impl PathBuf {
    pub fn into_string(self) -> Result<String, PathBuf> { ... }
}

Steps / History

(Remember to update the S-tracking-* label when checking boxes.)

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libsRelevant to the library team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions