summaryrefslogtreecommitdiffstats
path: root/vendor/gix-glob/src
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/gix-glob/src
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-glob/src')
-rw-r--r--vendor/gix-glob/src/pattern.rs5
-rw-r--r--vendor/gix-glob/src/wildmatch.rs2
2 files changed, 3 insertions, 4 deletions
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`.