Skip to content

Commit 3f752a8

Browse files
committed
Minor code style tweaks
1 parent 5534643 commit 3f752a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Microsoft.Toolkit/Collections/ObservableGroupedCollection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal bool TryGetList([NotNullWhen(true)] out List<ObservableGroup<TKey, TVal
4444
{
4545
list = Items as List<ObservableGroup<TKey, TValue>>;
4646

47-
return !(list is null);
47+
return list is not null;
4848
}
4949
}
5050
}

Microsoft.Toolkit/Diagnostics/Guard.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static void IsNull<T>(T? value, string name)
6868
public static void IsNotNull<T>([NotNull] T? value, string name)
6969
where T : class
7070
{
71-
if (!(value is null))
71+
if (value is not null)
7272
{
7373
return;
7474
}
@@ -88,7 +88,7 @@ public static void IsNotNull<T>([NotNull] T? value, string name)
8888
public static void IsNotNull<T>([NotNull] T? value, string name)
8989
where T : struct
9090
{
91-
if (!(value is null))
91+
if (value is not null)
9292
{
9393
return;
9494
}
@@ -196,7 +196,7 @@ public static void IsAssignableToType<T>(object value, string name)
196196
[MethodImpl(MethodImplOptions.AggressiveInlining)]
197197
public static void IsNotAssignableToType<T>(object value, string name)
198198
{
199-
if (!(value is T))
199+
if (value is not T)
200200
{
201201
return;
202202
}

0 commit comments

Comments
 (0)