Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Annotate or remove unused fields

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
backend

Research direction

Start with the listed fields in mp4parse/src/lib.rs and reproduce the clippy dead-code errors from the linked CI run. Review each field to decide whether it should be removed or annotated with #[allow(dead_code)]. Done means the listed dead-code warnings are resolved and the CI check passes.

Written by the indexing model from the issue text.

Description

Surfaced in CI by a recent clippy improvement, we have a number of fields which are parsed, but never read or exposed to external code:

In the short term the simplest solution is to annotate these fields with #[allow(dead_code)], but it's worth considering (perhaps on a case-by-case basis) whether it would be preferable to remove some of them entirely to reduce complexity.

error: field is never read: `uuid`
   --> mp4parse/src/lib.rs:333:5
    |
333 |     uuid: Option<[u8; 16]>,
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D dead-code` implied by `-D warnings`

error: field is never read: `major_brand`
   --> mp4parse/src/lib.rs:344:5
    |
344 |     major_brand: FourCC,
    |     ^^^^^^^^^^^^^^^^^^^

error: field is never read: `minor_version`
   --> mp4parse/src/lib.rs:345:5
    |
345 |     minor_version: u32,
    |     ^^^^^^^^^^^^^^^^^^

error: field is never read: `duration`
   --> mp4parse/src/lib.rs:353:5
    |
353 |     duration: u64,
    |     ^^^^^^^^^^^^^

error: field is never read: `media_rate_integer`
   --> mp4parse/src/lib.rs:390:5
    |
390 |     media_rate_integer: i16,
    |     ^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `media_rate_fraction`
   --> mp4parse/src/lib.rs:391:5
    |
391 |     media_rate_fraction: i16,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `data_reference_index`
   --> mp4parse/src/lib.rs:514:5
    |
514 |     data_reference_index: u16,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `data_reference_index`
   --> mp4parse/src/lib.rs:534:5
    |
534 |     data_reference_index: u16,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `profile`
   --> mp4parse/src/lib.rs:546:5
    |
546 |     profile: u8,
    |     ^^^^^^^^^^^

error: field is never read: `level`
   --> mp4parse/src/lib.rs:549:5
    |
549 |     level: u8,
    |     ^^^^^^^^^

error: field is never read: `transfer_characteristics`
   --> mp4parse/src/lib.rs:558:5
    |
558 |     transfer_characteristics: u8,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `matrix_coefficients`
   --> mp4parse/src/lib.rs:561:5
    |
561 |     matrix_coefficients: Option<u8>,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `video_full_range_flag`
   --> mp4parse/src/lib.rs:564:5
    |
564 |     video_full_range_flag: bool,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: field is never read: `version`
   --> mp4parse/src/lib.rs:604:5
    |
604 |     version: u8,
    |     ^^^^^^^^^^^

error: field is never read: `version`
   --> mp4parse/src/lib.rs:630:5
    |
630 |     version: u8,
    |     ^^^^^^^^^^^
Dominant language
Rust
Stars
448
Forks
72
Avg merge
20d 3h
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mozilla/mp4parse-rust

All issues in mozilla/mp4parse-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.