Skip to content

Commit

Permalink
Merge pull request #173 from MIRIMIRIM/master
Browse files Browse the repository at this point in the history
Remove some NativeAOT warnings
  • Loading branch information
neuecc authored Jul 30, 2024
2 parents 1c31455 + 40b4d86 commit 03f2d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ZLogger/Internal/MagicalBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ sealed class Handlers(
return false;
}

static bool EnumStringWrite<T>(MagicalBox box, int offset, ref DefaultInterpolatedStringHandler handler, int alignment, string? format)
static bool EnumStringWrite<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T>(MagicalBox box, int offset, ref DefaultInterpolatedStringHandler handler, int alignment, string? format)
{
if (box.TryRead<T>(offset, out var v))
{
Expand All @@ -393,7 +393,7 @@ static bool EnumStringWrite<T>(MagicalBox box, int offset, ref DefaultInterpolat
return false;
}

static bool EnumUtf8Write<T>(MagicalBox box, int offset, ref Utf8StringWriter<IBufferWriter<byte>> writer, int alignment, string? format)
static bool EnumUtf8Write<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties)] T>(MagicalBox box, int offset, ref Utf8StringWriter<IBufferWriter<byte>> writer, int alignment, string? format)
{
if (box.TryRead<T>(offset, out var v))
{
Expand Down

0 comments on commit 03f2d8b

Please sign in to comment.