Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Annotate or remove unused fields #340

Open
baumanj opened this issue Sep 14, 2021 · 0 comments
Open

Annotate or remove unused fields #340

baumanj opened this issue Sep 14, 2021 · 0 comments

Comments

@baumanj
Copy link
Contributor

baumanj commented Sep 14, 2021

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,
    |     ^^^^^^^^^^^
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant