Skip to content

Commit

Permalink
Annotate nullability.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed Mar 8, 2024
1 parent c078354 commit 8f6f015
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Launchpad.Common/Handlers/Manifest/ManifestEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
//

using System;
using System.Diagnostics.CodeAnalysis;

namespace Launchpad.Common.Handlers.Manifest
{
Expand Down Expand Up @@ -67,7 +68,7 @@ public ManifestEntry(string relativePath, string hash, long size)
/// <returns><c>true</c>, if the input was successfully parse, <c>false</c> otherwise.</returns>
/// <param name="rawInput">Raw input.</param>
/// <param name="inEntry">The resulting entry.</param>
public static bool TryParse(string rawInput, out ManifestEntry inEntry)
public static bool TryParse(string rawInput, [NotNullWhen(true)] out ManifestEntry? inEntry)
{
inEntry = null;

Expand Down Expand Up @@ -143,13 +144,13 @@ public override string ToString()
/// <param name="obj">The <see cref="object"/> to compare with the current <see cref="ManifestEntry"/>.</param>
/// <returns><c>true</c> if the specified <see cref="object"/> is equal to the current
/// <see cref="ManifestEntry"/>; otherwise, <c>false</c>.</returns>
public override bool Equals(object obj)
public override bool Equals(object? obj)
{
return Equals(obj as ManifestEntry);
}

/// <inheritdoc />
public bool Equals(ManifestEntry other)
public bool Equals(ManifestEntry? other)
{
if (other == null)
{
Expand Down

0 comments on commit 8f6f015

Please sign in to comment.