dolt/go/libraries/doltcore/diff: AsyncDiffer.Start takes Maps, does not need *Format.

This commit is contained in:
Aaron Son
2019-07-10 15:14:09 -07:00
committed by Brian Hendriks
parent b5d78b4cdc
commit c0e1cb0458
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -309,7 +309,7 @@ func diffRows(newRows, oldRows types.Map, newSch, oldSch schema.Schema) errhand.
}
ad := diff.NewAsyncDiffer(1024)
ad.Start(context.TODO(), newRows.Format(), newRows, oldRows)
ad.Start(context.TODO(), newRows, oldRows)
defer ad.Close()
src := diff.NewRowDiffSource(ad, oldToUnionConv, newToUnionConv, untypedUnionSch)
+2 -2
View File
@@ -30,14 +30,14 @@ func tableDontDescendLists(v1, v2 types.Value) bool {
return !types.IsPrimitiveKind(kind) && kind != types.TupleKind && kind == v2.Kind() && kind != types.RefKind
}
func (ad *AsyncDiffer) Start(ctx context.Context, format *types.Format, v1, v2 types.Value) {
func (ad *AsyncDiffer) Start(ctx context.Context, v1, v2 types.Map) {
go func() {
defer close(ad.diffChan)
defer func() {
// Ignore a panic from Diff...
recover()
}()
diff.Diff(ctx, format, v2, v1, ad.diffChan, ad.stopChan, true, tableDontDescendLists)
diff.Diff(ctx, v1.Format(), v2, v1, ad.diffChan, ad.stopChan, true, tableDontDescendLists)
}()
}