From cde4dbb35132848ffece59ef9cfaccff32347124 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 14 Jul 2020 15:24:17 -0400 Subject: Use dprint for internal formatting (#6682) --- std/testing/diff.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'std/testing/diff.ts') diff --git a/std/testing/diff.ts b/std/testing/diff.ts index da1e827ac..3a9eca4bb 100644 --- a/std/testing/diff.ts +++ b/std/testing/diff.ts @@ -41,7 +41,7 @@ export default function diff(A: T[], B: T[]): Array> { const suffixCommon = createCommon( A.slice(prefixCommon.length), B.slice(prefixCommon.length), - true + true, ).reverse(); A = suffixCommon.length ? A.slice(prefixCommon.length, -suffixCommon.length) @@ -57,16 +57,16 @@ export default function diff(A: T[], B: T[]): Array> { if (!N) { return [ ...prefixCommon.map( - (c): DiffResult => ({ type: DiffType.common, value: c }) + (c): DiffResult => ({ type: DiffType.common, value: c }), ), ...A.map( (a): DiffResult => ({ type: swapped ? DiffType.added : DiffType.removed, value: a, - }) + }), ), ...suffixCommon.map( - (c): DiffResult => ({ type: DiffType.common, value: c }) + (c): DiffResult => ({ type: DiffType.common, value: c }), ), ]; } @@ -91,7 +91,7 @@ export default function diff(A: T[], B: T[]): Array> { A: T[], B: T[], current: FarthestPoint, - swapped: boolean + swapped: boolean, ): Array<{ type: DiffType; value: T; @@ -133,7 +133,7 @@ export default function diff(A: T[], B: T[]): Array> { slide: FarthestPoint, down: FarthestPoint, k: number, - M: number + M: number, ): FarthestPoint { if (slide && slide.y === -1 && down && down.y === -1) { return { y: 0, id: 0 }; @@ -163,7 +163,7 @@ export default function diff(A: T[], B: T[]): Array> { down: FarthestPoint, _offset: number, A: T[], - B: T[] + B: T[], ): FarthestPoint { const M = A.length; const N = B.length; @@ -189,7 +189,7 @@ export default function diff(A: T[], B: T[]): Array> { fp[k + 1 + offset], offset, A, - B + B, ); } for (let k = delta + p; k > delta; --k) { @@ -199,7 +199,7 @@ export default function diff(A: T[], B: T[]): Array> { fp[k + 1 + offset], offset, A, - B + B, ); } fp[delta + offset] = snake( @@ -208,16 +208,16 @@ export default function diff(A: T[], B: T[]): Array> { fp[delta + 1 + offset], offset, A, - B + B, ); } return [ ...prefixCommon.map( - (c): DiffResult => ({ type: DiffType.common, value: c }) + (c): DiffResult => ({ type: DiffType.common, value: c }), ), ...backTrace(A, B, fp[delta + offset], swapped), ...suffixCommon.map( - (c): DiffResult => ({ type: DiffType.common, value: c }) + (c): DiffResult => ({ type: DiffType.common, value: c }), ), ]; } -- cgit v1.2.3