From 995f8fb478534fe715434d5fcd9aa438d14c4af3 Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Wed, 29 Jul 2020 15:58:04 +0100 Subject: [PATCH] Use unmanaged constraint. --- src/ImageSharp/Formats/Jpeg/Components/GenericBlock8x8.cs | 3 +-- src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/Components/GenericBlock8x8.cs b/src/ImageSharp/Formats/Jpeg/Components/GenericBlock8x8.cs index 7fe7d869c..38b902b88 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/GenericBlock8x8.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/GenericBlock8x8.cs @@ -4,7 +4,6 @@ using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -using SixLabors.ImageSharp.Advanced; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; @@ -16,7 +15,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components /// [StructLayout(LayoutKind.Sequential)] internal unsafe partial struct GenericBlock8x8 - where T : struct + where T : unmanaged { public const int Size = 64; diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs index 26e804b92..37bfe6bcf 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs @@ -6,7 +6,6 @@ using System.Buffers.Binary; using System.IO; using System.Linq; using System.Runtime.CompilerServices; -using System.Threading.Tasks; using SixLabors.ImageSharp.Common.Helpers; using SixLabors.ImageSharp.Formats.Jpeg.Components; using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;