1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-04-19 16:33:36 +03:00
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
Macintxsh 2023-12-31 14:01:11 +03:00
parent 97d19973b5
commit 940799320a
Signed by: mctaylors
GPG key ID: 7181BEBE676903C1

View file

@ -33,12 +33,9 @@ public partial class TimeSpanParser : AbstractTypeParser<TimeSpan>
} }
var matches = ParseRegex().Matches(timeSpanString); var matches = ParseRegex().Matches(timeSpanString);
if (matches.Count is 0) return matches.Count is 0
{ ? new ArgumentInvalidError(nameof(timeSpanString), "The regex did not produce any matches.")
return new ArgumentInvalidError(nameof(timeSpanString), "The regex did not produce any matches."); : ParseFromRegex(matches);
}
return ParseFromRegex(matches);
} }
private static Result<TimeSpan> ParseFromRegex(MatchCollection matches) private static Result<TimeSpan> ParseFromRegex(MatchCollection matches)