Skip to content

Commit 885e259

Browse files
Cleanup
1 parent 5ee6d62 commit 885e259

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/ImageSharp.Web/Commands/Converters/ArrayConverter{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ public T[] ConvertFrom(
2828
return Array.Empty<T>();
2929
}
3030

31-
var result = new List<T>();
31+
List<T> result = new();
3232
foreach (string pill in GetStringArray(value, culture))
3333
{
3434
T? item = parser.ParseValue<T>(pill, culture);
35-
if (item != null)
35+
if (item is not null)
3636
{
3737
result.Add(item);
3838
}

src/ImageSharp.Web/Commands/Converters/ListConverter{T}.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public List<T> ConvertFrom(
2323
string? value,
2424
Type propertyType)
2525
{
26-
var result = new List<T>();
26+
List<T> result = new();
2727
if (string.IsNullOrWhiteSpace(value))
2828
{
2929
return result;
@@ -32,7 +32,7 @@ public List<T> ConvertFrom(
3232
foreach (string pill in GetStringArray(value, culture))
3333
{
3434
T? item = parser.ParseValue<T>(pill, culture);
35-
if (item != null)
35+
if (item is not null)
3636
{
3737
result.Add(item);
3838
}

0 commit comments

Comments
 (0)