Browse Source

Removed Guard from ImageFormatManager.TryFindFormatByFileExtension

pull/2386/head
oliver@citruslime.com 4 years ago
parent
commit
82d3906dfe
  1. 2
      src/ImageSharp/Formats/ImageFormatManager.cs

2
src/ImageSharp/Formats/ImageFormatManager.cs

@ -102,8 +102,6 @@ public class ImageFormatManager
/// <returns><see langword="true"/> if a match is found; otherwise, <see langword="false"/></returns> /// <returns><see langword="true"/> if a match is found; otherwise, <see langword="false"/></returns>
public bool TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format) public bool TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format)
{ {
Guard.NotNullOrWhiteSpace(extension, nameof(extension));
if (extension[0] == '.') if (extension[0] == '.')
{ {
extension = extension[1..]; extension = extension[1..];

Loading…
Cancel
Save