Function
contains_subslice
(haystack: &[u8], needle: &[u8])
Source from the content-addressed store, hash-verified
| 318 | } |
| 319 | |
| 320 | fn contains_subslice(haystack: &[u8], needle: &[u8]) -> bool { |
| 321 | if needle.is_empty() || haystack.len() < needle.len() { |
| 322 | return false; |
| 323 | } |
| 324 | haystack |
| 325 | .windows(needle.len()) |
| 326 | .any(|window| window == needle) |
| 327 | } |
| 328 | |
| 329 | /// The most recent change hash on the current view. |
| 330 | fn latest_change_hash(repo: &atomic_repository::Repository) -> atomic_core::Hash { |
Callers
nothing calls this directly
Tested by
no test coverage detected