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
@@ -37,8 +37,7 @@ namespace Disco.Web.Areas.Services.Controllers
// Ensure supported version
if (Request.UserAgent.StartsWith(@"Disco-Client/", StringComparison.OrdinalIgnoreCase))
{
Version clientVersion;
if (Version.TryParse(Request.UserAgent.Substring(13), out clientVersion))
if (Version.TryParse(Request.UserAgent.Substring(13), out var clientVersion))
{
if (clientVersion < new Version(2, 2))
{
@@ -110,8 +109,7 @@ namespace Disco.Web.Areas.Services.Controllers
// Ensure supported version
if (Request.UserAgent.StartsWith(@"Disco-Client/", StringComparison.OrdinalIgnoreCase))
{
Version clientVersion;
if (Version.TryParse(Request.UserAgent.Substring(13), out clientVersion))
if (Version.TryParse(Request.UserAgent.Substring(13), out var clientVersion))
{
if (clientVersion < new Version(2, 2))
{