1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 17:44:48 +09:00

Enable IDE0110 (Remove unnecessary discard) (#70500)

This commit is contained in:
Stephen Toub 2022-06-09 16:09:33 -04:00 committed by GitHub
parent b603a5decc
commit daffba6b2d
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 11 deletions

View file

@ -1546,7 +1546,7 @@ dotnet_diagnostic.IDE0090.severity = silent
dotnet_diagnostic.IDE0100.severity = suggestion
# IDE0110: Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = suggestion
dotnet_diagnostic.IDE0110.severity = warning
# IDE0120: Simplify LINQ expression
dotnet_diagnostic.IDE0120.severity = none

View file

@ -243,8 +243,8 @@ namespace System.Data.Odbc
string svalue => svalue.Length,
byte[] bvalue => bvalue.Length,
char[] cvalue => cvalue.Length,
byte _ => 1,
char _ => 1,
byte => 1,
char => 1,
_ => 0
};
}

View file

@ -1189,15 +1189,15 @@ namespace System.Net.Http
switch (ex)
{
// Peer aborted the stream
case QuicStreamAbortedException _:
case QuicStreamAbortedException:
// User aborted the stream
case QuicOperationAbortedException _:
case QuicOperationAbortedException:
throw new IOException(SR.net_http_client_execution_error, new HttpRequestException(SR.net_http_client_execution_error, ex));
case QuicConnectionAbortedException _:
case QuicConnectionAbortedException:
// Our connection was reset. Start aborting the connection.
Exception abortException = _connection.Abort(ex);
throw new IOException(SR.net_http_client_execution_error, new HttpRequestException(SR.net_http_client_execution_error, abortException));
case Http3ConnectionException _:
case Http3ConnectionException:
// A connection-level protocol error has occurred on our stream.
_connection.Abort(ex);
throw new IOException(SR.net_http_client_execution_error, new HttpRequestException(SR.net_http_client_execution_error, ex));

View file

@ -455,7 +455,7 @@ namespace Microsoft.Interop
}
}
}
else if (_contextSymbol is INamedTypeSymbol _)
else if (_contextSymbol is INamedTypeSymbol)
{
// TODO: Handle when we create a struct marshalling generator
// Do we want to support CountElementName pointing to only fields, or properties as well?

View file

@ -56,9 +56,9 @@ namespace System.Security.Cryptography.X509Certificates
// The AndroidKeyStore doesn't support adding DSA private key entries in newer versions (API 23+)
// Our minimum supported version (API 21) does support it, but for simplicity, we simply block adding
// certificates with DSA private keys on all versions instead of trying to support it on two versions.
SafeDsaHandle _ => throw new PlatformNotSupportedException(SR.Cryptography_X509_StoreDSAPrivateKeyNotSupported),
SafeEcKeyHandle _ => Interop.AndroidCrypto.PAL_KeyAlgorithm.EC,
SafeRsaHandle _ => Interop.AndroidCrypto.PAL_KeyAlgorithm.RSA,
SafeDsaHandle => throw new PlatformNotSupportedException(SR.Cryptography_X509_StoreDSAPrivateKeyNotSupported),
SafeEcKeyHandle => Interop.AndroidCrypto.PAL_KeyAlgorithm.EC,
SafeRsaHandle => Interop.AndroidCrypto.PAL_KeyAlgorithm.RSA,
_ => throw new NotSupportedException(SR.NotSupported_KeyAlgorithm)
};