summaryrefslogtreecommitdiffstats
path: root/src/flagged.rs
diff options
context:
space:
mode:
authorqkzk <qu3nt1n@gmail.com>2023-11-11 22:45:25 +0100
committerqkzk <qu3nt1n@gmail.com>2023-11-11 22:45:25 +0100
commit8df0013fafc02b3017d061da5043dff9c5ea0f9f (patch)
tree91ce6cb61819b36cd49622b5dae33396975467af /src/flagged.rs
parent62318af5310fa679184f1d5d6f6148c2a1b0008c (diff)
inline flagged contains since it's used for every file
Diffstat (limited to 'src/flagged.rs')
-rw-r--r--src/flagged.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/flagged.rs b/src/flagged.rs
index 5d32971..8f5d627 100644
--- a/src/flagged.rs
+++ b/src/flagged.rs
@@ -48,6 +48,7 @@ impl Flagged {
/// True if the `path` is flagged.
/// Since we maintain the content sorted, we can use a binary search and
/// compensate a little bit with using a vector instead of a set.
+ #[inline]
pub fn contains(&self, path: &Path) -> bool {
self.content.binary_search(&path.to_path_buf()).is_ok()
}