Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 4fec2a0

Browse files
committed
cleanup
1 parent 8e83147 commit 4fec2a0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/ServiceStack.Text/CsvSerializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ private static WriteObjectDelegate GetWriteFn()
270270
bestCandidateEnumerableType = typeof(T).GetTypeWithGenericTypeDefinitionOf(typeof(IEnumerable<>));
271271
if (bestCandidateEnumerableType != null)
272272
{
273-
var dictionarOrKvps = typeof(T).HasInterface(typeof(IEnumerable<KeyValuePair<string, object>>))
274-
|| typeof(T).HasInterface(typeof(IEnumerable<KeyValuePair<string, string>>));
275-
if (dictionarOrKvps)
273+
var dictionaryOrKvps = typeof(T).HasInterface(typeof(IEnumerable<KeyValuePair<string, object>>))
274+
|| typeof(T).HasInterface(typeof(IEnumerable<KeyValuePair<string, string>>));
275+
if (dictionaryOrKvps)
276276
{
277277
return WriteSelf;
278278
}

src/ServiceStack.Text/Jsv/JsvReader.Generic.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ public static ParseStringSpanDelegate GetParseStringSpanFn(Type type)
3333
do
3434
{
3535
snapshot = ParseFnCache;
36-
newCache = new Dictionary<Type, ParseFactoryDelegate>(ParseFnCache);
37-
newCache[type] = parseFactoryFn;
36+
newCache = new Dictionary<Type, ParseFactoryDelegate>(ParseFnCache) {
37+
[type] = parseFactoryFn
38+
};
3839

3940
} while (!ReferenceEquals(
4041
Interlocked.CompareExchange(ref ParseFnCache, newCache, snapshot), snapshot));

0 commit comments

Comments
 (0)