Skip to content

Commit 60216f9

Browse files
committed
Simplify datasets assignment
1 parent 38976e9 commit 60216f9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

extensions/ql-vscode/src/view/compare-performance/ComparePerformance.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function ComparePerformanceWithData(props: {
356356
}) {
357357
const { data } = props;
358358

359-
const datasets = useMemo(
359+
const { from, to } = useMemo(
360360
() => ({
361361
from: new ComparisonDataset(data.from),
362362
to: new ComparisonDataset(data.to),
@@ -374,8 +374,6 @@ function ComparePerformanceWithData(props: {
374374

375375
const [metric, setMetric] = useState<Metric>(metrics.tuples);
376376

377-
const { from, to } = datasets;
378-
379377
const nameSet = new Set(from.data.names);
380378
for (const name of to.data.names) {
381379
nameSet.add(name);

0 commit comments

Comments
 (0)