diff --git a/ReMime/Platform/UnixMediaTypeResolver.cs b/ReMime/Platform/UnixMediaTypeResolver.cs index e133106..9b8c8f9 100644 --- a/ReMime/Platform/UnixMediaTypeResolver.cs +++ b/ReMime/Platform/UnixMediaTypeResolver.cs @@ -47,10 +47,7 @@ namespace ReMime.Platform public bool TryResolve(string extension, out MediaType? mediaType) { - if (_extensionsMap.TryGetValue(extension, out mediaType)) - return true; - else - return false; + return _extensionsMap.TryGetValue(extension, out mediaType); } private static readonly char[] s_delimeters = new char[] { '\t', ' ' }; diff --git a/ReMime/Platform/Win32MediaTypeResolver.cs b/ReMime/Platform/Win32MediaTypeResolver.cs index bb5ddc4..adf2ad6 100644 --- a/ReMime/Platform/Win32MediaTypeResolver.cs +++ b/ReMime/Platform/Win32MediaTypeResolver.cs @@ -52,15 +52,7 @@ namespace ReMime.Platform public bool TryResolve(string extension, out MediaType? mediaType) { - if (_extensionsMap.TryGetValue(extension, out mediaType)) - { - return true; - } - else - { - mediaType = null; - return true; - } + return _extensionsMap.TryGetValue(extension, out mediaType); } } } \ No newline at end of file