rust-lang / rust-lang/glob

Unify MatchOptions new() and default() function

Open
#101 1 comment 1 reaction 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

As per its documentation, MatchOptions' default values are these:

MatchOptions {
    case_sensitive: true,
    require_literal_separator: false,
    require_literal_leading_dot: false
}

However, its derived Default implementation gives this:

MatchOptions {
    case_sensitive: false,
    require_literal_separator: false,
    require_literal_leading_dot: false
}

This Default implementation doesn't do what it should, which is potentially very confusing. Fixing this is a breaking change though, so it should wait for 0.4

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

Locate the MatchOptions implementation and compare the behavior of its new() and default() functions with the documented values. Update the default behavior so case_sensitive matches the documented default, then verify the public API behavior and account for the planned 0.4 breaking change.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.