Skip to content

refactor: deduplicate file extension extraction in image helpers#71

Merged
jfernandez merged 1 commit intomainfrom
refactor/deduplicate-image-extension-logic
Mar 15, 2026
Merged

refactor: deduplicate file extension extraction in image helpers#71
jfernandez merged 1 commit intomainfrom
refactor/deduplicate-image-extension-logic

Conversation

@jfernandez
Copy link
Copy Markdown
Owner

Summary

  • is_image_file and guess_image_content_type both extracted the file extension with identical 4-line snippets
  • is_image_file now delegates to guess_image_content_type, checking if the returned content type starts with "image/"

Test plan

  • cargo test passes

@jfernandez jfernandez merged commit 913cb6a into main Mar 15, 2026
9 checks passed
@jfernandez jfernandez deleted the refactor/deduplicate-image-extension-logic branch March 15, 2026 18:22
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.

1 participant