Function
contains_subslice
(haystack: &[u8], needle: &[u8])
Source from the content-addressed store, hash-verified
| 115 | } |
| 116 | |
| 117 | fn contains_subslice(haystack: &[u8], needle: &[u8]) -> bool { |
| 118 | if needle.is_empty() || haystack.len() < needle.len() { |
| 119 | return false; |
| 120 | } |
| 121 | haystack |
| 122 | .windows(needle.len()) |
| 123 | .any(|window| window == needle) |
| 124 | } |
| 125 | |
| 126 | /// Push the branch and the binding namespace to a bare remote, then clone |
| 127 | /// and configure the RFC §8.6 fetch refspec on the client. |
Callers
nothing calls this directly
Tested by
no test coverage detected