diff --git a/src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs b/src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs index 1568727927..231b3f5dd1 100644 --- a/src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs +++ b/src/ImageSharp/Metadata/Profiles/XMP/XElementEqualityComparer.cs @@ -2,7 +2,6 @@ // Licensed under the Apache License, Version 2.0. using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; using System.Xml.Linq; namespace SixLabors.ImageSharp.Metadata.Profiles.Xmp @@ -13,9 +12,9 @@ namespace SixLabors.ImageSharp.Metadata.Profiles.Xmp public class XElementEqualityComparer : IEqualityComparer { /// - public bool Equals([AllowNull] XElement x, [AllowNull] XElement y) => x.Name == y.Name && x.Value == y.Value; + public bool Equals(XElement x, XElement y) => x.Name == y.Name && x.Value == y.Value; /// - public int GetHashCode([DisallowNull] XElement obj) => obj.GetHashCode(); + public int GetHashCode(XElement obj) => obj.GetHashCode(); } } diff --git a/tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs b/tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs index 5aa68f59d8..4ef5fd774d 100644 --- a/tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs +++ b/tests/ImageSharp.Tests/Metadata/Profiles/XMP/XmpProfileTests.cs @@ -19,15 +19,15 @@ namespace SixLabors.ImageSharp.Tests.Metadata.Profiles.Xmp { public class XmpProfileTests { - private static GifDecoder GifDecoder => new GifDecoder() { IgnoreMetadata = false }; + private static GifDecoder GifDecoder => new() { IgnoreMetadata = false }; - private static JpegDecoder JpegDecoder => new JpegDecoder() { IgnoreMetadata = false }; + private static JpegDecoder JpegDecoder => new() { IgnoreMetadata = false }; - private static PngDecoder PngDecoder => new PngDecoder() { IgnoreMetadata = false }; + private static PngDecoder PngDecoder => new() { IgnoreMetadata = false }; - private static TiffDecoder TiffDecoder => new TiffDecoder() { IgnoreMetadata = false }; + private static TiffDecoder TiffDecoder => new() { IgnoreMetadata = false }; - private static WebpDecoder WebpDecoder => new WebpDecoder() { IgnoreMetadata = false }; + private static WebpDecoder WebpDecoder => new() { IgnoreMetadata = false }; [Theory] [WithFile(TestImages.Gif.Receipt, PixelTypes.Rgba32)]