Skip to content

Commit

Permalink
IEqualityOperators
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 committed Jun 9, 2024
1 parent 78ecfb7 commit 3ef5dae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions AssetRipper.Primitives/UnityGuid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace AssetRipper.Primitives;
[System.Text.Json.Serialization.JsonConverter(typeof(UnityGuidJsonConverter))]
#endif
public readonly record struct UnityGuid
#if NET7_0_OR_GREATER
: System.Numerics.IEqualityOperators<UnityGuid, UnityGuid, bool>
#endif
{
public UnityGuid(Guid guid)
{
Expand Down
7 changes: 6 additions & 1 deletion AssetRipper.Primitives/Utf8String.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ namespace AssetRipper.Primitives;
/// <remarks>
/// Conversions to and from <see cref="string"/> are handled by <see cref="Encoding.UTF8"/>.
/// </remarks>
public sealed class Utf8String : IEquatable<Utf8String>
public sealed class Utf8String :
#if NET7_0_OR_GREATER
System.Numerics.IEqualityOperators<Utf8String?, Utf8String?, bool>,
System.Numerics.IEqualityOperators<Utf8String?, string?, bool>,
#endif
IEquatable<Utf8String>
{
private readonly byte[] data;
private string? cachedString;
Expand Down

0 comments on commit 3ef5dae

Please sign in to comment.