style: reduce redundant nesting

This commit is contained in:
Oliver Booth 2024-04-17 16:00:46 +01:00
parent 16eb21e879
commit dd683c2bf3
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 9 additions and 9 deletions

View File

@ -33,18 +33,18 @@ internal sealed class ListCommand : AsyncCommand<ListSettings>
{
int fileCount = files.Count;
if (fileCount > 1)
{
if (fileCount <= 1)
continue;
duplicates += fileCount;
AnsiConsole.MarkupLineInterpolated($"Found [cyan]{fileCount}[/] identical files");
AnsiConsole.MarkupLineInterpolated($"SHA512 [green]{hash}[/]:");
AnsiConsole.MarkupLineInterpolated($"{settings.Algorithm.Humanize()} [green]{hash}[/]:");
foreach (FileInfo file in files)
AnsiConsole.MarkupLineInterpolated($"- {file.FullName}");
AnsiConsole.WriteLine();
}
}
if (duplicates == 0)
AnsiConsole.MarkupLine("[green]No duplicates found![/]");