Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
afxres committed Dec 31, 2023
1 parent 9ba9063 commit 074b9c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ static void Register<T>(Dictionary<Type, ConverterPair> dictionary) where T : un
{
var little = new LittleEndianConverter<T>();
var native = new NativeEndianConverter<T>();
dictionary.Add(typeof(T), new ConverterPair(little, native));
dictionary.Add(typeof(T), (little, native));
}

static void RegisterRepeat<T, E>(Dictionary<Type, ConverterPair> dictionary) where T : unmanaged where E : unmanaged
{
var little = new RepeatLittleEndianConverter<T, E>();
var native = new NativeEndianConverter<T>();
dictionary.Add(typeof(T), new ConverterPair(little, native));
dictionary.Add(typeof(T), (little, native));
}

var dictionary = new Dictionary<Type, ConverterPair>();
Expand Down
4 changes: 2 additions & 2 deletions code/Binary/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ private static TokenValue GetTokens(Token origin)
var result = new Token(generator, target, origin, decode);
builder.Add(source, result);
}
return new TokenValue(builder.ToImmutable(), null);
return (builder.ToImmutable(), null);
}
catch (Exception e)
{
return new TokenValue(ImmutableDictionary.Create<string, Token>(), e);
return (ImmutableDictionary.Create<string, Token>(), e);
}
}

Expand Down

0 comments on commit 074b9c3

Please sign in to comment.