From 781f32595f311e6817c0292d13e46b51a7210dc9 Mon Sep 17 00:00:00 2001 From: John Call Date: Fri, 16 Jul 2021 16:20:41 -0700 Subject: [PATCH] Improve Etag ToString --- sdk/core/Azure.Core/src/ETag.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/core/Azure.Core/src/ETag.cs b/sdk/core/Azure.Core/src/ETag.cs index b5b4f9911999..c4ef519bb964 100644 --- a/sdk/core/Azure.Core/src/ETag.cs +++ b/sdk/core/Azure.Core/src/ETag.cs @@ -105,11 +105,9 @@ public string ToString(string format) return string.Empty; } - var _needsQuoateWrap = !IsValidQuotedFormat(_value); - return format switch { - HeaderFormat => _needsQuoateWrap ? $"{QuoteString}{_value}{QuoteString}" : _value, + HeaderFormat => !IsValidQuotedFormat(_value) ? $"{QuoteString}{_value}{QuoteString}" : _value, DefaultFormat => _value, _ => throw new ArgumentException("Invalid format string.") };