mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
perf: remove local method, exclude coverage for default arm
This commit is contained in:
parent
85f4e8c733
commit
08a4df0c64
@ -1,6 +1,5 @@
|
||||
#if NETCOREAPP3_0_OR_GREATER
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Globalization;
|
||||
using System.Runtime.CompilerServices;
|
||||
@ -101,14 +100,6 @@ public static class RuneExtensions
|
||||
// dotcover disable
|
||||
//NOSONAR
|
||||
default:
|
||||
return Default();
|
||||
//NOSONAR
|
||||
// dotcover enable
|
||||
}
|
||||
|
||||
[ExcludeFromCodeCoverage, DoesNotReturn]
|
||||
string Default()
|
||||
{
|
||||
string exceptionFormat = ExceptionMessages.UnexpectedRuneUtf8SequenceLength;
|
||||
string message = string.Format(CultureInfo.CurrentCulture, exceptionFormat, length);
|
||||
#if NET7_0_OR_GREATER
|
||||
@ -116,8 +107,8 @@ public static class RuneExtensions
|
||||
#else
|
||||
throw new InvalidOperationException(message);
|
||||
#endif
|
||||
|
||||
return default;
|
||||
//NOSONAR
|
||||
// dotcover enable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user