From d8919552bcf408aa5d3f2fbc298ffed87f87c864 Mon Sep 17 00:00:00 2001 From: Jeremy Sinclair <4016293+snickler@users.noreply.github.com> Date: Sat, 21 Oct 2023 09:54:13 -0400 Subject: [PATCH] [EnvVar] Use ArgumentNullException.ThrowIfNull --- .../Settings.UI.Library/EnvironmentVariablesSettings.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs index 0263d88bfc..5189fc7842 100644 --- a/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs +++ b/src/settings-ui/Settings.UI.Library/EnvironmentVariablesSettings.cs @@ -31,10 +31,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library WriteIndented = true, }; - if (settingsUtils == null) - { - throw new ArgumentNullException(nameof(settingsUtils)); - } + ArgumentNullException.ThrowIfNull(settingsUtils); settingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), ModuleName); }