Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou committed May 21, 2024
1 parent a0a5d6b commit 3395938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Meziantou.Polyfill/PolyfillGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void Initialize(IncrementalGeneratorInitializationContext context)
{
if (Environment.GetEnvironmentVariable("Meziantou_Polyfill_Debug") is "true" or "1")
{
Debugger.Launch();
_ = Debugger.Launch();
Debugger.Break();
}

Expand Down
22 changes: 5 additions & 17 deletions Meziantou.Polyfill/PolyfillOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@

namespace Meziantou.Polyfill;

internal sealed class PolyfillOptions : IEquatable<PolyfillOptions>
internal sealed class PolyfillOptions(string? included, string? excluded) : IEquatable<PolyfillOptions>
{
private readonly string[]? _included;
private readonly string[]? _excluded;

public PolyfillOptions(string? included, string? excluded)
{
_included = ParseValues(included);
_excluded = ParseValues(excluded);
}
private readonly string[]? _included = ParseValues(included);
private readonly string[]? _excluded = ParseValues(excluded);

public bool Include(string memberDocumentationId)
{
Expand Down Expand Up @@ -107,15 +101,9 @@ public string DumpAsCSharpComment()
}

[StructLayout(LayoutKind.Auto)]
private ref struct SemiColonSplitEnumerator
private ref struct SemiColonSplitEnumerator(ReadOnlySpan<char> str)
{
private ReadOnlySpan<char> _str;

public SemiColonSplitEnumerator(ReadOnlySpan<char> str)
{
_str = str;
Current = default;
}
private ReadOnlySpan<char> _str = str;

public readonly SemiColonSplitEnumerator GetEnumerator() => this;

Expand Down

0 comments on commit 3395938

Please sign in to comment.