Skip to content

#2807 Add early return in InternalDetectFormat#2835

Merged
JimBobSquarePants merged 1 commit into
SixLabors:mainfrom
stefannikolei:sn/internaldetectformat
Nov 6, 2024
Merged

#2807 Add early return in InternalDetectFormat#2835
JimBobSquarePants merged 1 commit into
SixLabors:mainfrom
stefannikolei:sn/internaldetectformat

Conversation

@stefannikolei

Copy link
Copy Markdown
Contributor

Added the early return in this method when a format is found.

@JimBobSquarePants JimBobSquarePants left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lovely. Thanks!

@JimBobSquarePants JimBobSquarePants merged commit 702d71f into SixLabors:main Nov 6, 2024
@stefannikolei stefannikolei deleted the sn/internaldetectformat branch November 6, 2024 06:50
@antonfirsov

Copy link
Copy Markdown
Member

A test would be nice for this to formalize the behavioral requirement.

@stefannikolei

Copy link
Copy Markdown
Contributor Author

A test would be nice for this to formalize the behavioral requirement.

Sure. Would you mind helping me? Perhaps point me in the right direction?

@JimBobSquarePants

Copy link
Copy Markdown
Member

You’d have to make a test decoder that has a matching set of criteria as an existing one and test to ensure the correct decoder is returned based on the registration order.

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.

3 participants