fixup! fix: make SemanticVersionRange equality structural
Some checks failed
default / dotnet-default-workflow (push) Failing after 45s
Some checks failed
default / dotnet-default-workflow (push) Failing after 45s
This commit is contained in:
parent
fba1476d9c
commit
eb20fb8077
1 changed files with 9 additions and 5 deletions
|
|
@ -1,8 +1,6 @@
|
|||
// Copyright (c) The Geekeey Authors
|
||||
// SPDX-License-Identifier: EUPL-1.2
|
||||
|
||||
using System;
|
||||
|
||||
namespace Geekeey.SemVer;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -79,7 +77,9 @@ public readonly partial struct SemanticVersionRange : IEquatable<SemanticVersion
|
|||
|
||||
/// <inheritdoc />
|
||||
public override bool Equals(object? obj)
|
||||
=> obj is SemanticVersionRange other && Equals(other);
|
||||
{
|
||||
return obj is SemanticVersionRange other && Equals(other);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int GetHashCode()
|
||||
|
|
@ -106,13 +106,17 @@ public readonly partial struct SemanticVersionRange : IEquatable<SemanticVersion
|
|||
/// Determines whether two semantic version ranges are equal.
|
||||
/// </summary>
|
||||
public static bool operator ==(SemanticVersionRange left, SemanticVersionRange right)
|
||||
=> left.Equals(right);
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether two semantic version ranges differ.
|
||||
/// </summary>
|
||||
public static bool operator !=(SemanticVersionRange left, SemanticVersionRange right)
|
||||
=> !left.Equals(right);
|
||||
{
|
||||
return !left.Equals(right);
|
||||
}
|
||||
}
|
||||
|
||||
internal enum Comparison { Eq, Neq, Lt, Lte, Gt, Gte }
|
||||
|
|
|
|||
Loading…
Reference in a new issue