Skip to content

Conversation

@RunDevelopment
Copy link
Collaborator

I spend some time fixing typos and adding more docs. This PR only changes comments except for one thing: I added a few assert!s in PixelInfo::block and PixelInfo::bi_planar. These asserts now explicitly enforce the requirements that were already implicitly checked in other places.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves code documentation and comments throughout the codebase by fixing typos, improving clarity, and adding missing documentation. The only code changes are the addition of assert! statements in PixelInfo::block and PixelInfo::bi_planar to explicitly enforce parameter constraints.

  • Standardized terminology: "sub-sampled" → "subsampled", "Multi-threaded" → "Multithreaded"
  • Fixed grammatical issues and typos (e.g., "between 0 to 1" → "between 0 and 1", "marco" → "macro")
  • Added documentation for previously undocumented public methods, fields, and types

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/split.rs Improved clarity of SplitView documentation and added doc comment for get() method
src/progress.rs Standardized "Multi-threaded" to "Multithreaded", fixed grammar ("between 0 to 1" → "between 0 and 1"), added documentation links
src/pixel.rs Standardized "sub-sampled" to "subsampled", added extensive documentation for struct fields and methods, added assert! statements to enforce parameter constraints
src/lib.rs Added documentation section about cancellation support
src/layout.rs Added doc comments for DataRegion trait and TextureArrayKind enum, fixed typo ("simply" → "simple")
src/iter.rs Added documentation for SurfaceInfo and fixed grammar ("is has" → "has")
src/header.rs Fixed typos ("marco" → "macro", grammar improvements)
src/format.rs Standardized "sub-sampled" to "subsampled", clarified documentation for format conversion methods
src/error.rs Added documentation for InvalidSize error variant
src/encoder.rs Improved documentation clarity for encoder options and mipmap generation behavior
src/encode/mod.rs Added documentation for EncodeOptions, ResizeFilter, Dithering, and ErrorMetric types and their methods
src/detect.rs Standardized "sub-sampled" to "subsampled" in comments
src/decoder.rs Added documentation for options field
src/decode/read_write.rs Standardized "sub-sampling" to "subsampling" in comments
src/decode/mod.rs Added documentation for DecodeOptions struct
src/color/mod.rs Added documentation for ColorFormat fields and constructor

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

RunDevelopment and others added 3 commits November 12, 2025 17:39
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@RunDevelopment RunDevelopment merged commit be395b6 into image-rs:main Nov 23, 2025
10 checks passed
@RunDevelopment RunDevelopment deleted the impr-docs branch November 23, 2025 18:57
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