qol: inline variable declaration

This commit is contained in:
Gary Sharp
2025-07-20 15:12:33 +10:00
parent 5792771ea1
commit 1add4ee0f5
89 changed files with 1229 additions and 1512 deletions
@@ -235,8 +235,7 @@ namespace Disco.Web.Areas.API.Controllers
}
private void UpdateScope(DocumentTemplatePackage Package, string Scope)
{
AttachmentTypes scope;
if (!Enum.TryParse(Scope, true, out scope))
if (!Enum.TryParse<AttachmentTypes>(Scope, true, out var scope))
throw new ArgumentException("Invalid Scope", nameof(Scope));
if (Package.Scope != scope)