Skip to content

Commit 4a58c41

Browse files
committed
chore: enable nullable for SummaryTable.cs
1 parent 29d874c commit 4a58c41

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/BenchmarkDotNet/Reports/SummaryTable.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
using Perfolizer.Horology;
88
using Perfolizer.Metrology;
99

10+
#nullable enable
11+
1012
namespace BenchmarkDotNet.Reports
1113
{
1214
public class SummaryTable
@@ -36,24 +38,26 @@ internal SummaryTable(Summary summary, SummaryStyle? style = null)
3638
FullHeader = Array.Empty<string>();
3739
FullContent = Array.Empty<string[]>();
3840
FullContentStartOfHighlightGroup = Array.Empty<bool>();
41+
FullContentStartOfLogicalGroup = Array.Empty<bool>();
3942
FullContentWithHeader = Array.Empty<string[]>();
4043
IsDefault = Array.Empty<bool>();
44+
EffectiveSummaryStyle = summary.Style ?? SummaryStyle.Default;
4145
return;
4246
}
4347

4448
// Ensure we have all required data for styling
4549
style = style ?? summary.Style ?? SummaryStyle.Default;
4650
if (style.TimeUnit == null)
4751
{
48-
style = style.WithTimeUnit(TimeUnit.GetBestTimeUnit(summary.Reports.Where(r => r.ResultStatistics != null).Select(r => r.ResultStatistics.Mean)
52+
style = style.WithTimeUnit(TimeUnit.GetBestTimeUnit(summary.Reports.Where(r => r.ResultStatistics != null).Select(r => r.ResultStatistics!.Mean)
4953
.ToArray()));
5054
}
5155

5256
if (style.SizeUnit == null)
5357
{
5458
style = style.WithSizeUnit(SizeUnit.GetBestSizeUnit(summary.Reports
5559
.Where(r => r.GcStats.GetBytesAllocatedPerOperation(r.BenchmarkCase).HasValue)
56-
.Select(r => r.GcStats.GetBytesAllocatedPerOperation(r.BenchmarkCase).Value)
60+
.Select(r => r.GcStats.GetBytesAllocatedPerOperation(r.BenchmarkCase)!.Value)
5761
.ToArray()));
5862
}
5963
EffectiveSummaryStyle = style;

0 commit comments

Comments
 (0)