Skip to content

Commit 5372bbc

Browse files
committed
Use C# 9.0 features.
1 parent 99a5e91 commit 5372bbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Source/Bogus/Transliterater.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static string Translate(string input, string lang = "en")
4545
//Try using Char Map
4646
var used = 0;
4747
var chCharMap = WalkTrie(i, input, CharMap, ref used);
48-
if( chCharMap is object )
48+
if( chCharMap is not null )
4949
{
5050
//After walking the trie, we found a match,
5151
//use what we found instead.
@@ -60,7 +60,7 @@ public static string Translate(string input, string lang = "en")
6060
//Try Diatric Map
6161
used = 0;
6262
var chDiatric = WalkTrie(i, input, DiatricMap, ref used);
63-
if( chDiatric is object )
63+
if( chDiatric is not null )
6464
{
6565
sb.Append(chDiatric);
6666
i += used - 1;

Source/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project>
22
<PropertyGroup>
3-
<LangVersion>8.0</LangVersion>
3+
<LangVersion>9.0</LangVersion>
44
</PropertyGroup>
55
</Project>

0 commit comments

Comments
 (0)