Skip to content

Commit 86f9171

Browse files
committed
Turn conditional into assertion
1 parent c10c54d commit 86f9171

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dotnet/src/webdriver/BiDi/Modules/Script/LocalValue.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
using System;
2121
using System.Collections.Generic;
22+
using System.Diagnostics;
2223
using System.Linq;
2324
using System.Numerics;
2425
using System.Text.Json;
@@ -232,7 +233,7 @@ public static RegExp FromRegex(Regex regex)
232233

233234
const RegexOptions NonBacktracking = (RegexOptions)1024;
234235
#if NET8_0_OR_GREATER
235-
System.Diagnostics.Debug.Assert(NonBacktracking == RegexOptions.NonBacktracking);
236+
Debug.Assert(NonBacktracking == RegexOptions.NonBacktracking);
236237
#endif
237238

238239
const RegexOptions NonApplicableOptions = RegexOptions.Compiled | NonBacktracking;
@@ -268,10 +269,7 @@ public static RegExp FromRegex(Regex regex)
268269
flags += "s";
269270
}
270271

271-
if (options != RegexOptions.None)
272-
{
273-
// Consider logging?
274-
}
272+
Debug.Assert(options == RegexOptions.None);
275273

276274
return new RegExp(new RegExpValue(regex.ToString()) { Flags = flags });
277275

0 commit comments

Comments
 (0)