From 05d729b4098a4f9015c88aaae680dcb0cf072480 Mon Sep 17 00:00:00 2001 From: Turner Bass Date: Thu, 11 Oct 2018 16:41:48 -0500 Subject: [PATCH] UrlHelperBase L166-167 declared type of url in TryFastGenerateUrl --- src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs index c468e5280c..6f377c3dd4 100644 --- a/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs +++ b/src/Microsoft.AspNetCore.Mvc.Core/Routing/UrlHelperBase.cs @@ -162,9 +162,8 @@ namespace Microsoft.AspNetCore.Mvc.Routing // Perf: In most of the common cases, GenerateUrl is called with a null protocol, host and fragment. // In such cases, we might not need to build any URL as the url generated is mostly same as the virtual path available in pathData. - // For such common cases, this FastGenerateUrl method saves a string allocation per GenerateUrl call. - string url; - if (TryFastGenerateUrl(protocol, host, virtualPath, fragment, out url)) + // For such common cases, this FastGenerateUrl method saves a string allocation per GenerateUrl call. + if (TryFastGenerateUrl(protocol, host, virtualPath, fragment, out string url)) { return url; }