mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 01:05:19 +03:00
Use pattern matching for null checks (#13793)
Fix the few that slipped through
This commit is contained in:
@@ -21,7 +21,7 @@ public static class ContainerHelper
|
||||
public static bool ContainsContainer(string? profileContainers, string? inputContainer)
|
||||
{
|
||||
var isNegativeList = false;
|
||||
if (profileContainers != null && profileContainers.StartsWith('-'))
|
||||
if (profileContainers is not null && profileContainers.StartsWith('-'))
|
||||
{
|
||||
isNegativeList = true;
|
||||
profileContainers = profileContainers[1..];
|
||||
@@ -42,7 +42,7 @@ public static class ContainerHelper
|
||||
public static bool ContainsContainer(string? profileContainers, ReadOnlySpan<char> inputContainer)
|
||||
{
|
||||
var isNegativeList = false;
|
||||
if (profileContainers != null && profileContainers.StartsWith('-'))
|
||||
if (profileContainers is not null && profileContainers.StartsWith('-'))
|
||||
{
|
||||
isNegativeList = true;
|
||||
profileContainers = profileContainers[1..];
|
||||
|
||||
Reference in New Issue
Block a user