mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-11 02:59:34 -06:00
Diff: We can never get nil as a Value (#2108)
...so remove the handling of that and panic.
This commit is contained in:
@@ -34,12 +34,7 @@ func Diff(w io.Writer, v1, v2 types.Value) (err error) {
|
||||
err = d.Try(func() {
|
||||
for di, ok := dq.PopFront(); ok; di, ok = dq.PopFront() {
|
||||
p, key, v1, v2 := di.path, di.key, di.v1, di.v2
|
||||
if v1 == nil && v2 != nil {
|
||||
line(w, addPrefix, key, v2)
|
||||
}
|
||||
if v1 != nil && v2 == nil {
|
||||
line(w, subPrefix, key, v1)
|
||||
}
|
||||
d.Chk.True(v1 != nil && v2 != nil) // nil is not a valid types.Value and we should never get one
|
||||
if !v1.Equals(v2) {
|
||||
if !canCompare(v1, v2) {
|
||||
line(w, subPrefix, key, v1)
|
||||
|
||||
Reference in New Issue
Block a user