Skip to content

Commit 0749d9e

Browse files
committed
Fix a small bug related to StoreHashCode
1 parent 55b6998 commit 0749d9e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Src/FastData.Generator.CPlusPlus/Internal/Generators/HashSetPerfectCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct e
3838
"""
3939
: $$"""
4040
{{GetFieldModifier(false)}}std::array<{{TypeName}}, {{ctx.Data.Length.ToStringInvariant()}}> entries = {
41-
{{FormatColumns(ctx.Data, x => x.Value.ToStringInvariant())}}
41+
{{FormatColumns(ctx.Data, x => ToValueLabel(x.Key))}}
4242
};
4343
4444
{{HashSource}}

Src/FastData.Generator.CSharp/Internal/Generators/HashSetPerfectCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ internal E({{TypeName}} value, {{HashSizeType}} hashCode)
4141
"""
4242
: $$"""
4343
{{FieldModifier}}{{TypeName}}[] _entries = {
44-
{{FormatColumns(ctx.Data, x => x.Value.ToStringInvariant())}}
44+
{{FormatColumns(ctx.Data, x => ToValueLabel(x.Key))}}
4545
};
4646
4747
{{MethodAttribute}}

Src/FastData.Generator.Rust/Internal/Generators/HashSetPerfectCode.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public override string Generate(ReadOnlySpan<T> data)
4040

4141
return $$"""
4242
{{FieldModifier}}const ENTRIES: [{{TypeNameWithLifetime}}; {{ctx.Data.Length.ToStringInvariant()}}] = [
43-
{{FormatColumns(ctx.Data, x => ToValueLabel(x.Value))}}
43+
{{FormatColumns(ctx.Data, x => ToValueLabel(x.Key))}}
4444
];
4545
4646
{{HashSource}}

0 commit comments

Comments
 (0)