rust-lang / rust-lang/rust

Implement String and str conversion to Cow<OsStr>

Open
#117,527 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

It would be nice to have the following:

  • From<&'a str> for Cow<'a, OsStr>
  • From<String> for Cow<'a, OsStr>

Right now I have a bunch of OsStr::new("true").into() and OsString::from(value).into() sprinkled in my code.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue requests From<&str> and From implementations for Cow. No file or test is named, so first locate the existing Cow, OsStr, and OsString conversion entry points in the Rust standard library. Done means both listed conversions are supported and covered by the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.