Skip to content

Remove Nullable disable from Png Code#3024

Open
stefannikolei wants to merge 1 commit into
SixLabors:mainfrom
stefannikolei:sn/nullable_png
Open

Remove Nullable disable from Png Code#3024
stefannikolei wants to merge 1 commit into
SixLabors:mainfrom
stefannikolei:sn/nullable_png

Conversation

@stefannikolei
Copy link
Copy Markdown
Contributor

I added a new Property to PngChunk --> DataSpan. On all places Data was used the same way. So we have the guard on this place and can just use it.

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

I added a new Property to PngChunk --> DataSpan. On all places Data was used the same way. So we have the guard on this place and can just use it.
public IMemoryOwner<byte> Data { get; }
public IMemoryOwner<byte>? Data { get; }

public ReadOnlySpan<byte> DataSpan
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a better idea to to this? Or should I check for null at all consuming places?

@JimBobSquarePants
Copy link
Copy Markdown
Member

@stefannikolei I'm going to revisit nullability post v4 launch. I want to put some thought to each leftover instance.

@stefannikolei
Copy link
Copy Markdown
Contributor Author

Let me know. I am happy to help.

If you want you can create issues and assign some to me 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants