Skip to content

Commit

Permalink
docs: Improve code documentation and clippy usage in media module
Browse files Browse the repository at this point in the history
- Add comment explaining the use of `clippy::map_entry` in [packages/media_record/src/media.rs]
- Include link to open issue on Rust Clippy GitHub repo in the comment
  • Loading branch information
dhilipsiva committed Jul 16, 2024
1 parent e9a5130 commit d1af18a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/media_record/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ impl SessionMediaWriter {
SessionRecordEvent::TrackMedia(id, media) => {
// We allow clippy::map_entry because the suggestion provided by clippy has a bug:
// cannot borrow `*self` as mutable more than once at a time
// There is a open Issue on the Rust Clippy GitHub Repo:
// https://github.com/rust-lang/rust-clippy/issues/11976
#[allow(clippy::map_entry)]

Check warning on line 68 in packages/media_record/src/media.rs

View check run for this annotation

Codecov / codecov/patch

packages/media_record/src/media.rs#L64-L68

Added lines #L64 - L68 were not covered by tests
if !self.tracks.contains_key(&id) {
let writer = self.get_free_writer_for(event.ts, media.meta.is_audio());
Expand Down

0 comments on commit d1af18a

Please sign in to comment.