Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Enumerable.Count(list) with list.Count #434

Merged
merged 1 commit into from
Apr 10, 2024

Conversation

SokyranTheDragon
Copy link
Member

Minor change that should not really affect anything, as Enumerable.Count() would still end up calling list.Count:

switch (source)
{
    // Skipped irrelevant code
    case ICollection<TSource> sources:
        return sources.Count;
    // Skipped irrelevant code
}

@SokyranTheDragon SokyranTheDragon added enhancement New feature or request. low priority Quality of life or ignorable to an extent. 1.4 Fixes or bugs relating to 1.4 (Not Biotech). 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). and removed 1.4 Fixes or bugs relating to 1.4 (Not Biotech). labels Apr 1, 2024
@SokyranTheDragon
Copy link
Member Author

Merged with master, now targeting 1.5

@notfood
Copy link
Member

notfood commented Apr 6, 2024

Don't merge, rebase. Look at the changes, this is not merge-able anymore.
https://www.atlassian.com/git/tutorials/merging-vs-rebasing

@SokyranTheDragon
Copy link
Member Author

Welp, guess I should get to it. I guess I should learn more about Git. I've honestly never looked into how rebasing works, since merging usually for me good enough.

Minor change that should not really affect anything, as `Enumerable.Count()` would still end up calling `list.Count`:

```csharp
switch (source)
{
    // Skipped irrelevant code
    case ICollection<TSource> sources:
        return sources.Count;
    // Skipped irrelevant code
}
```
@SokyranTheDragon
Copy link
Member Author

@notfood did I do it correctly here and in #432? I've force pushed to get rid of the merge commit, as the changes due to rebase ended up being rejected otherwise.

@notfood
Copy link
Member

notfood commented Apr 8, 2024

Looks correct now. Usually just look at the diff, if it contains things you didn't intend to add, some wrong commit sneaked in

@Zetrith Zetrith merged commit 8fcf76f into rwmt:master Apr 10, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.5 Fixes or bugs relating to 1.5 (Not Anomaly). enhancement New feature or request. low priority Quality of life or ignorable to an extent.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants