Skip to content

Commit

Permalink
Remove unused usings
Browse files Browse the repository at this point in the history
  • Loading branch information
meziantou committed Oct 23, 2022
1 parent 4d47001 commit 988fbef
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
16 changes: 4 additions & 12 deletions src/Meziantou.Analyzer/Internals/StringExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;

#if NETSTANDARD2_0
using System.Diagnostics.CodeAnalysis;
#endif

namespace Meziantou.Analyzer.Rules;

internal static partial class StringExtensions
Expand Down Expand Up @@ -57,17 +60,6 @@ public bool MoveNext()

var span = _str;
var index = span.IndexOfAny('\r', '\n');
/* Unmerged change from project 'Meziantou.Analyzer (netstandard2.0)'
Before:
if (index == -1)
{
_str = ReadOnlySpan<char>.Empty;
After:
if (index == -1)
{
_str = ReadOnlySpan<char>.Empty;
*/

if (index == -1)
{
_str = ReadOnlySpan<char>.Empty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics.CodeAnalysis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static async Task<Document> ImplementIEquatable(Document document, Synta
return document;

// Retrieve Nullable Annotation from the Equals method and use it to construct the concrete interface
var equalsMethod = declaredTypeSymbol.GetMembers().OfType<IMethodSymbol>().Where(m => IsEqualsOfTMethod(m)).SingleOrDefault(m => m != null);
var equalsMethod = declaredTypeSymbol.GetMembers().OfType<IMethodSymbol>().SingleOrDefault(m => IsEqualsOfTMethod(m) && m != null);
if (equalsMethod is null)
return document;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;

#if ROSLYN3
using System.Linq;
#endif

namespace Meziantou.Analyzer.Rules;

[DiagnosticAnalyzer(LanguageNames.CSharp)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
using Microsoft.CodeAnalysis.Editing;
using Microsoft.CodeAnalysis.Operations;

#if ROSLYN3
using System.Linq;
#endif

namespace Meziantou.Analyzer.Rules;

[ExportCodeFixProvider(LanguageNames.CSharp), Shared]
Expand Down

0 comments on commit 988fbef

Please sign in to comment.