rust-lang / rust-lang/glob

[1.0] Take `S: AsRef<Path>` rather than `&Path`

Open
#167 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
595
Forks
93
PR merge metrics
No merged PRs in 30d

Description

For API such as https://docs.rs/glob/latest/glob/struct.Pattern.html#method.matches_path, take a more general AsRef<Path> rather than Path.

We may even want to take AsRef<OsStr>, which would allow combining the &str and &Path API

Contributor guide

No contributing guide indexed for this repository

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

Start with Pattern::matches_path in the linked documentation and inspect related path-taking APIs in the crate. Clarify whether the change should cover only this method or also the &str and &Path APIs. Done means the intended API generalization is implemented without changing matching behavior and the existing tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.