glob icon indicating copy to clipboard operation
glob copied to clipboard

Unify MatchOptions new() and default() function

Open kangalio opened this issue 4 years ago • 1 comments

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

kangalio avatar Dec 22 '20 12:12 kangalio

Ah that is very unfortunate ☹️ In the meantime we should note in the documentation that the behavior of Default is not the same.

KodrAus avatar Jan 08 '21 09:01 KodrAus