MCPcopy Create free account
hub / github.com/emwalker/digraph / has_subsequence

Method has_subsequence

backend/src/git/core/mod.rs:252–256  ·  view source on GitHub ↗
(haystack: &[u8], needle: &[u8])

Source from the content-addressed store, hash-verified

250 let mut link_count = 0;
251
252 fn has_subsequence(haystack: &[u8], needle: &[u8]) -> bool {
253 haystack
254 .windows(needle.len())
255 .any(|window| window == needle)
256 }
257
258 tree.walk(git2::TreeWalkMode::PreOrder, |_root, entry| {
259 if let Some(name) = entry.name() {

Callers

nothing calls this directly

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected