[EnvVar] Use ArgumentNullException.ThrowIfNull

This commit is contained in:
Jeremy Sinclair 2023-10-21 09:54:13 -04:00
parent f63a84e7b3
commit d8919552bc

View File

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