Skip to content

Conversation

SuuperW
Copy link
Contributor

@SuuperW SuuperW commented Oct 4, 2025

Title.

Copy link
Member

@YoshiRulz YoshiRulz left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM.

.Where(static info => !info.DisplayName.StartsWith("RA ") && !string.IsNullOrEmpty(info.DefaultBinding))
.Select(static info => info.DefaultBinding);
#pragma warning disable MA0031 // Optimize Enumerable.Count() usage
Debug.Assert(bindings.Count() == bindings.Distinct().Count(), "Do not default bind multiple hotkeys to the same button combination.");
Copy link
Member

Choose a reason for hiding this comment

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

The actual problem here is that this is a double enumeration. Enumerate .ToArray() first.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What's the double enumeration? I enumerate bindings twice, but doing a ToArray won't change that.

Copy link
Member

Choose a reason for hiding this comment

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

double/multiple enumeration

Looks like the built-in diagnostic for catching those wasn't actually enabled...

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