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); }