From 074b9c3e411f7a24042abb2561243fb3b5c9339a Mon Sep 17 00:00:00 2001 From: miko Date: Sun, 31 Dec 2023 19:47:20 +0800 Subject: [PATCH] Fix code style --- .../Creators.Endianness/DetectEndianConverterCreator.cs | 4 ++-- code/Binary/Token.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Binary/Creators.Endianness/DetectEndianConverterCreator.cs b/code/Binary/Creators.Endianness/DetectEndianConverterCreator.cs index f525db99..ec83f623 100644 --- a/code/Binary/Creators.Endianness/DetectEndianConverterCreator.cs +++ b/code/Binary/Creators.Endianness/DetectEndianConverterCreator.cs @@ -17,14 +17,14 @@ static void Register(Dictionary dictionary) where T : un { var little = new LittleEndianConverter(); var native = new NativeEndianConverter(); - dictionary.Add(typeof(T), new ConverterPair(little, native)); + dictionary.Add(typeof(T), (little, native)); } static void RegisterRepeat(Dictionary dictionary) where T : unmanaged where E : unmanaged { var little = new RepeatLittleEndianConverter(); var native = new NativeEndianConverter(); - dictionary.Add(typeof(T), new ConverterPair(little, native)); + dictionary.Add(typeof(T), (little, native)); } var dictionary = new Dictionary(); diff --git a/code/Binary/Token.cs b/code/Binary/Token.cs index 31a478ca..1e00282f 100644 --- a/code/Binary/Token.cs +++ b/code/Binary/Token.cs @@ -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(), e); + return (ImmutableDictionary.Create(), e); } }