Skip to content

Commit 8997383

Browse files
committed
chore: linting
Signed-off-by: Vincent Biret <[email protected]>
1 parent 763c0c1 commit 8997383

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/Microsoft.OpenApi/Models/OpenApiDocument.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,9 @@ public ISet<OpenApiTag>? Tags
9292
{
9393
return;
9494
}
95-
if (value is HashSet<OpenApiTag> tags && tags.Comparer is OpenApiTagComparer)
96-
{
97-
_tags = tags;
98-
}
99-
else
100-
{
101-
_tags = new HashSet<OpenApiTag>(value, OpenApiTagComparer.Instance);
102-
}
95+
_tags = value is HashSet<OpenApiTag> tags && tags.Comparer is OpenApiTagComparer ?
96+
tags :
97+
new HashSet<OpenApiTag>(value, OpenApiTagComparer.Instance);
10398
}
10499
}
105100

src/Microsoft.OpenApi/Models/OpenApiOperation.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,9 @@ public ISet<OpenApiTagReference>? Tags
4040
{
4141
return;
4242
}
43-
if (value is HashSet<OpenApiTagReference> tags && tags.Comparer is OpenApiTagComparer)
44-
{
45-
_tags = tags;
46-
}
47-
else
48-
{
49-
_tags = new HashSet<OpenApiTagReference>(value, OpenApiTagComparer.Instance);
50-
}
43+
_tags = value is HashSet<OpenApiTagReference> tags && tags.Comparer is OpenApiTagComparer ?
44+
tags :
45+
new HashSet<OpenApiTagReference>(value, OpenApiTagComparer.Instance);
5146
}
5247
}
5348

0 commit comments

Comments
 (0)