This commit is contained in:
sxyazi 2023-10-01 13:40:18 +08:00
parent 2965a23dbf
commit 6d10d286aa
No known key found for this signature in database

View file

@ -7,7 +7,7 @@ use shared::Url;
use crate::files::Files;
pub struct Finder {
query: Regex,
query: Regex,
matched: BTreeMap<Url, u8>,
version: u64,
}
@ -124,14 +124,10 @@ impl Finder {
impl Finder {
#[inline]
pub fn matched(&self) -> &BTreeMap<Url, u8> {
&self.matched
}
pub fn matched(&self) -> &BTreeMap<Url, u8> { &self.matched }
#[inline]
pub fn has_matched(&self) -> bool {
!self.matched.is_empty()
}
pub fn has_matched(&self) -> bool { !self.matched.is_empty() }
#[inline]
pub fn matched_idx(&self, url: &Url) -> Option<u8> {