From dc0db358abe19481e475e10c32149b53370f1a1c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 30 May 2024 05:57:31 +0200 Subject: Merging upstream version 1.72.1+dfsg1. Signed-off-by: Daniel Baumann --- vendor/gix-glob/src/pattern.rs | 5 ++--- vendor/gix-glob/src/wildmatch.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'vendor/gix-glob/src') diff --git a/vendor/gix-glob/src/pattern.rs b/vendor/gix-glob/src/pattern.rs index 2aefaa9a0..3c0dbfea2 100644 --- a/vendor/gix-glob/src/pattern.rs +++ b/vendor/gix-glob/src/pattern.rs @@ -30,7 +30,7 @@ bitflags! { /// Describes whether to match a path case sensitively or not. /// -/// Used in [Pattern::matches_repo_relative_path()]. +/// Used in [`Pattern::matches_repo_relative_path()`]. #[derive(Default, Debug, PartialOrd, PartialEq, Copy, Clone, Hash, Ord, Eq)] pub enum Case { /// The case affects the match @@ -116,8 +116,7 @@ impl Pattern { value .len() .checked_sub(text.len()) - .map(|start| text.eq_ignore_ascii_case(&value[start..])) - .unwrap_or(false) + .map_or(false, |start| text.eq_ignore_ascii_case(&value[start..])) } else { value.ends_with(text.as_ref()) } diff --git a/vendor/gix-glob/src/wildmatch.rs b/vendor/gix-glob/src/wildmatch.rs index 5144a9b8b..bcf6c668d 100644 --- a/vendor/gix-glob/src/wildmatch.rs +++ b/vendor/gix-glob/src/wildmatch.rs @@ -343,7 +343,7 @@ pub(crate) mod function { } } } - t.next().map(|_| NoMatch).unwrap_or(Match) + t.next().map_or(Match, |_| NoMatch) } /// Employ pattern matching to see if `value` matches `pattern`. -- cgit v1.2.3