Skip to content

Commit

Permalink
Update Parser.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Apr 15, 2023
1 parent e2dbd43 commit 2754408
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Verify.ExceptionParsing/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void ThrowIfEmpty(string directory)

if (firstLine.StartsWith("VerifyException : Directory: "))
{
var directory = firstLine.Substring(29);
var directory = firstLine[29..];

ThrowIfEmpty(directory);

Expand All @@ -110,7 +110,7 @@ void ThrowIfEmpty(string directory)

if (firstLine.StartsWith("Directory: "))
{
var directory = firstLine.Substring(11);
var directory = firstLine[11..];

ThrowIfEmpty(directory);

Expand All @@ -127,7 +127,7 @@ static string TrimStart(string next, string prefix)
throw new ParseException($"Expected line to start with `{prefix}`. Line: {next}");
}

var trimmed = next.Substring(prefix.Length);
var trimmed = next[prefix.Length..];

if (!string.IsNullOrWhiteSpace(trimmed))
{
Expand Down

0 comments on commit 2754408

Please sign in to comment.