in src/main.rs [314:329]
fn fast_patch(
&mut self,
regex: &Regex,
subst: &str,
path: &Path,
contents: &str,
) -> Result<bool> {
let new_contents = regex.replace_all(contents, subst);
match new_contents {
Cow::Borrowed(_) => Ok(false),
Cow::Owned(_) => {
self.save(path, &new_contents)?;
Ok(true)
}
}
}