Apply review style fix#90
Conversation
Reviewer's GuideThis PR refactors documentation in src/frame.rs for both LengthFormat and LengthPrefixedProcessor, standardizing comment layout, expanding parameter/return/error sections, reflowing text, and relocating #[must_use] attributes immediately after their doc comments. Class diagram for LengthFormat and LengthPrefixedProcessor (no structural changes, doc refactor only)classDiagram
class LengthFormat {
+usize bytes
+Endianness endianness
+const fn new(bytes: usize, endianness: Endianness) -> Self
+const fn u16_be() -> Self
+const fn u16_le() -> Self
+const fn u32_be() -> Self
+const fn u32_le() -> Self
+fn read_len(&self, bytes: &[u8]) -> io::Result<usize>
+fn write_len(&self, len: usize, dst: &mut BytesMut) -> io::Result<()>
+fn default() -> Self
}
class LengthPrefixedProcessor {
+LengthFormat format
+const fn new(format: LengthFormat) -> Self
+fn default() -> Self
}
LengthPrefixedProcessor --> LengthFormat : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
3c2f732
into
coderabbitai/docstrings/1xkdW72YLzFPtDuYvRHSlqJDNZV1LOalMMJAsPJaqhzg0bRGbWUfow5qDt3NQhVyRrfHxEpqbapJBjBu3bBO1mqm
…prefixedprocessor` (#89) * 📝 Add docstrings to `codex/define-endianness-enum-and-refactor-lengthprefixedprocessor` Docstrings generation was requested by @leynos. * #87 (comment) The following files were modified: * `src/app.rs` * `src/frame.rs` * `tests/response.rs` * Move attributes below doc comments (#90) --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Leynos <leynos@troubledskies.net>
* Add configurable length format for frames * 📝 Add docstrings to `codex/define-endianness-enum-and-refactor-lengthprefixedprocessor` (#89) * 📝 Add docstrings to `codex/define-endianness-enum-and-refactor-lengthprefixedprocessor` Docstrings generation was requested by @leynos. * #87 (comment) The following files were modified: * `src/app.rs` * `src/frame.rs` * `tests/response.rs` * Move attributes below doc comments (#90) --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Leynos <leynos@troubledskies.net> * Refine length prefix handling * Use rstest for length format tests * Fix syntax errors and update tests (#91) --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
LengthFormatandLengthPrefixedProcessordocs to keep attributes after commentsTesting
make fmtmake lintmake testmdformat-allmarkdownlint --fixnixie docs/*https://chatgpt.com/codex/tasks/task_e_685575b46e908322b312e27581b4e6df
Summary by Sourcery
Refine documentation comments for LengthFormat and LengthPrefixedProcessor to preserve attributes post-comments and improve clarity.
Documentation: