chore: resolve actionable TODO/FIXME comments#73
Open
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Open
chore: resolve actionable TODO/FIXME comments#73nightness wants to merge 1 commit intowebrtc-rs:masterfrom
nightness wants to merge 1 commit intowebrtc-rs:masterfrom
Conversation
- rtc-turn/proto/evenport.rs: Clarify EVEN-PORT R-flag constant — the FIXME suggested (1<<8)-1=255 but RFC 5766 §14.6 requires only the MSB; existing value 0b10000000 is correct. Replace FIXME with an explanatory comment. - rtc/rtp_transceiver/rtp_sender/rtp_codec.rs: Replace TODO comment on unicode case-folding with eq_ignore_ascii_case(), which is allocation-free and correct for ASCII-only MIME types. - rtc-sctp/src/endpoint/mod.rs: Replace DoS TODO with a precise comment referencing RFC 4960 §5.1.3 and documenting the existing protection. - rtc/peer_connection/configuration/setting_engine.rs: Replace misleading mDNS "Re-enable it to QueryOnly" TODO with a comment explaining the opt-in design. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1b47706 to
501d281
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Cleans up four concrete TODO/FIXME items found in a codebase-wide audit:
rtc-turn/src/proto/evenport.rs:37FIXME? (1 << 8) - 1— the existing0b10000000value is correct per RFC 5766 §14.6 (only the MSB is the R flag); replaced the FIXME with an explanatory commentrtc/src/rtp_transceiver/rtp_sender/rtp_codec.rs:145TODO: unicode case-folding+.to_uppercase()witheq_ignore_ascii_case()— allocation-free and correct for ASCII-only MIME typesrtc-sctp/src/endpoint/mod.rs:133concurrent_associationsprotection and referencing RFC 4960 §5.1.3 for a future stateless cookie implementationrtc/src/peer_connection/configuration/setting_engine.rs:175Re-enable it to QueryOnlyTODO with a comment explaining the opt-in design (both the core and the async wrapper require explicit configuration)Test plan
cargo buildpassescargo test -p rtcpasses (246 tests)cargo test -p rtc-sctppassescargo test -p rtc-turnpasses🤖 Generated with Claude Code