Skip to content

Commit

Permalink
remove the limit on input size for diff gen
Browse files Browse the repository at this point in the history
  • Loading branch information
its-the-shrimp committed Dec 2, 2024
1 parent 9634026 commit 88a1945
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,7 @@ mod r#impl {

impl<'a> Diff<'a> {
pub fn compute(expected: &'a str, actual: &'a str) -> Option<Self> {
if expected.len() + actual.len() > 2048 {
// We don't yet trust the dissimilar crate to work well on large
// inputs.
return None;
}

// Nor on non-ascii inputs.
// We don't yet trust the dissimilar crate to work well on on non-ascii inputs.
let diff = panic::catch_unwind(|| dissimilar::diff(expected, actual)).ok()?;

let mut common_len = 0;
Expand Down

0 comments on commit 88a1945

Please sign in to comment.