mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-17 18:27:49 +00:00
check
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#[allow(dead_code)]
|
||||
pub fn is_simple_match<P, N>(pattern: P, name: N) -> bool
|
||||
where
|
||||
P: AsRef<str>,
|
||||
@@ -14,12 +15,13 @@ where
|
||||
inner_match(pattern, name, false)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn is_match_as_pattern_prefix<P, N>(pattern: P, text: N) -> bool
|
||||
where
|
||||
P: AsRef<str>,
|
||||
N: AsRef<str>,
|
||||
{
|
||||
let (mut p, mut t) = (pattern.as_ref().as_bytes().into_iter(), text.as_ref().as_bytes().into_iter());
|
||||
let (mut p, mut t) = (pattern.as_ref().as_bytes().iter(), text.as_ref().as_bytes().iter());
|
||||
|
||||
while let (Some(&x), Some(&y)) = (p.next(), t.next()) {
|
||||
if x == b'*' {
|
||||
|
||||
Reference in New Issue
Block a user