diff options
author | Joe Tsai <joetsai@digital-static.net> | 2021-10-12 11:15:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 11:15:02 -0700 |
commit | 6faefd0594fae82639a62c23f0aed1451509dcc0 (patch) | |
tree | 7f30ca1ff28938cd6a4eec7f6189d4e233579295 /cmp/report_slices.go | |
parent | f1773ad7bdb1ddccb1801c5b8ca4311cf0d301e4 (diff) | |
download | go-cmp-6faefd0594fae82639a62c23f0aed1451509dcc0.tar.gz |
Reduce minimum length for specialize string diffing (#275)
The original threshold of 64 was chosen without much thought.
Lower it to 32 now that we have some concrete examples
that it is aesthetically better.
Co-authored-by: Damien Neil <neild@users.noreply.github.com>
Diffstat (limited to 'cmp/report_slices.go')
-rw-r--r-- | cmp/report_slices.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmp/report_slices.go b/cmp/report_slices.go index 9809228..68b5c1a 100644 --- a/cmp/report_slices.go +++ b/cmp/report_slices.go @@ -80,7 +80,7 @@ func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { } // Use specialized string diffing for longer slices or strings. - const minLength = 64 + const minLength = 32 return vx.Len() >= minLength && vy.Len() >= minLength } |