1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-10 03:45:41 +00:00

perf: remove local method, exclude coverage for default arm

This commit is contained in:
Oliver Booth 2023-04-02 02:56:50 +01:00
parent 85f4e8c733
commit 08a4df0c64
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025

View File

@ -1,6 +1,5 @@
#if NETCOREAPP3_0_OR_GREATER #if NETCOREAPP3_0_OR_GREATER
using System.Diagnostics; using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts; using System.Diagnostics.Contracts;
using System.Globalization; using System.Globalization;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -101,14 +100,6 @@ public static class RuneExtensions
// dotcover disable // dotcover disable
//NOSONAR //NOSONAR
default: default:
return Default();
//NOSONAR
// dotcover enable
}
[ExcludeFromCodeCoverage, DoesNotReturn]
string Default()
{
string exceptionFormat = ExceptionMessages.UnexpectedRuneUtf8SequenceLength; string exceptionFormat = ExceptionMessages.UnexpectedRuneUtf8SequenceLength;
string message = string.Format(CultureInfo.CurrentCulture, exceptionFormat, length); string message = string.Format(CultureInfo.CurrentCulture, exceptionFormat, length);
#if NET7_0_OR_GREATER #if NET7_0_OR_GREATER
@ -116,8 +107,8 @@ public static class RuneExtensions
#else #else
throw new InvalidOperationException(message); throw new InvalidOperationException(message);
#endif #endif
//NOSONAR
return default; // dotcover enable
} }
} }
} }