MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / apply_replacement_simple

Method apply_replacement_simple

hail-fuzz/src/i2s/finder.rs:236–239  ·  view source on GitHub ↗

Apply the current replacement to `dst` adjusting the current offset.

(&mut self, dst: &mut Vec<u8>)

Source from the content-addressed store, hash-verified

234
235 /// Apply the current replacement to `dst` adjusting the current offset.
236 pub(crate) fn apply_replacement_simple(&mut self, dst: &mut Vec<u8>) {
237 let len = self.replacement.len().min(dst.len().saturating_sub(self.offset));
238 dst[self.offset..self.offset + len].copy_from_slice(&self.replacement[..len]);
239 }
240
241 pub(crate) fn apply_replacement_extended(&mut self, dst: &mut Vec<u8>) {
242 if self.extended_replacement.len() < self.replacement.len()

Callers 1

apply_replacementMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected