mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-19 16:33:36 +03:00
meh
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
97d19973b5
commit
940799320a
1 changed files with 3 additions and 6 deletions
|
@ -33,12 +33,9 @@ public partial class TimeSpanParser : AbstractTypeParser<TimeSpan>
|
|||
}
|
||||
|
||||
var matches = ParseRegex().Matches(timeSpanString);
|
||||
if (matches.Count is 0)
|
||||
{
|
||||
return new ArgumentInvalidError(nameof(timeSpanString), "The regex did not produce any matches.");
|
||||
}
|
||||
|
||||
return ParseFromRegex(matches);
|
||||
return matches.Count is 0
|
||||
? new ArgumentInvalidError(nameof(timeSpanString), "The regex did not produce any matches.")
|
||||
: ParseFromRegex(matches);
|
||||
}
|
||||
|
||||
private static Result<TimeSpan> ParseFromRegex(MatchCollection matches)
|
||||
|
|
Loading…
Add table
Reference in a new issue