Skip to content

Commit

Permalink
Note the difference between new() and default()
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
  • Loading branch information
JohnTitor committed Oct 29, 2022
1 parent 80588ef commit 6631fd7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,11 @@ impl MatchOptions {
/// require_literal_leading_dot: false
/// }
/// ```
///
/// # Note
/// The behavior of this method doesn't match `default()`'s. This returns
/// `case_sensitive` as `true` while `default()` does it as `false`.
// FIXME: Consider unity the behavior with `default()` in a next major release.
pub fn new() -> Self {
Self {
case_sensitive: true,
Expand Down

0 comments on commit 6631fd7

Please sign in to comment.