Skip to content

Intermediate Test - [Priority Queue]#1

Merged
ilya-krivtsov merged 4 commits intomainfrom
priority-queue
Apr 25, 2025
Merged

Intermediate Test - [Priority Queue]#1
ilya-krivtsov merged 4 commits intomainfrom
priority-queue

Conversation

@ilya-krivtsov
Copy link
Owner

No description provided.

<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что-то StyleCop не подключен, ни тут, ни в тестах. А GlobalSuppressions для него есть

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Он в Directory.Build.props в корне

public void Setup()
{
queue = Comparer == null ? new() : new(Comparer);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Активнее используйте expression-bodied-методы

/// <param name="comparer">Comparer to use; if <see langword="null"/>, defaults to <see cref="Comparer{TPriority}.Default"/>.</param>
public PriorityQueue(IComparer<TPriority>? comparer = null)
{
head = null;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Да оно и так null, явной инициализации в конструкторе не требуется (это же не C++)

@@ -0,0 +1,76 @@
namespace PriorityQueue.Tests;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Надо ещё шапку с информацией о лицензии

@ilya-krivtsov ilya-krivtsov merged commit 7c99f34 into main Apr 25, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants