Fix silly if statement.

This commit is contained in:
H. Utku Maden 2024-05-26 11:13:14 +03:00
parent a89e51f5e7
commit 1060d7d73c
2 changed files with 2 additions and 13 deletions

@ -47,10 +47,7 @@ namespace ReMime.Platform
public bool TryResolve(string extension, out MediaType? mediaType) public bool TryResolve(string extension, out MediaType? mediaType)
{ {
if (_extensionsMap.TryGetValue(extension, out mediaType)) return _extensionsMap.TryGetValue(extension, out mediaType);
return true;
else
return false;
} }
private static readonly char[] s_delimeters = new char[] { '\t', ' ' }; private static readonly char[] s_delimeters = new char[] { '\t', ' ' };

@ -52,15 +52,7 @@ namespace ReMime.Platform
public bool TryResolve(string extension, out MediaType? mediaType) public bool TryResolve(string extension, out MediaType? mediaType)
{ {
if (_extensionsMap.TryGetValue(extension, out mediaType)) return _extensionsMap.TryGetValue(extension, out mediaType);
{
return true;
}
else
{
mediaType = null;
return true;
}
} }
} }
} }