We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
finish
The LCS implementation does not always call finish at the end of its execution. This can cause issues when used with diff hooks like Replace.
Replace
You can use the code below as a regression test.
use similar::algorithms::{lcs, DiffHook}; struct HasRunFinish(bool); impl DiffHook for HasRunFinish { type Error = (); fn finish(&mut self) -> Result<(), Self::Error> { self.0 = true; Ok(()) } } let mut d = HasRunFinish(false); let slice = &[1, 2]; lcs::diff(&mut d, slice, 0..slice.len(), slice, 0..slice.len()).unwrap(); assert!(d.0);
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
The LCS implementation does not always call
finish
at the end of its execution. This can cause issues when used with diff hooks likeReplace
.You can use the code below as a regression test.
The text was updated successfully, but these errors were encountered: