rust-lang / rust-lang/glob

[1.0] Restructure `PatternError`

Open
#166 0 comments 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

Strongly typed errors would be helpful:

#[non_exhaustive]
pub struct PatternError {
    pub pos: usize,
    pub msg: PattternErrorKind,
}

#[non_exhaustive]
enum PattternErrorKind {
    // ...
}

This would make it easier for any crates using glob to transform errors into their own messages if desired.

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 the PatternError API in the glob crate and review how its current errors are represented. Define the affected error kinds and acceptance criteria from the proposed strongly typed structure; done means consumers can inspect the position and error kind when transforming messages.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.