Skip to content

Commit

Permalink
refactor: Use collection expression for array
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDave1999 committed Jul 6, 2024
1 parent ac0cf7d commit 667d012
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Parser/YeSqlParser.HelperMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ private bool IsCommentWithTag(ref Line line)
/// </returns>
private string ExtractTagName(ref Line line)
{
var extractedTag = line.Text.Split(new[] { ':' }, MaxCount)[1];
var extractedTag = line.Text.Split([':'], MaxCount)[1];
if (string.IsNullOrWhiteSpace(extractedTag))
{
ValidationResult.Add(errorMessage: FormatParserExceptionMessage(
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/YeSqlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace YeSql.Net;
/// </summary>
public partial class YeSqlParser
{
private static readonly string[] s_newLines = new[] { "\r\n", "\n", "\r" };
private static readonly string[] s_newLines = ["\r\n", "\n", "\r"];

/// <summary>
/// The maximum number of substrings to be returned by the Split method.
Expand Down

0 comments on commit 667d012

Please sign in to comment.