Annotate or remove unused fields
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/mp4parse-rust
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
mozilla/mp4parse-rust#444 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
mozilla/mp4parse-rust#441 ·
-
senc box Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
mozilla/mp4parse-rust#415 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
mozilla/mp4parse-rust#414 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
mozilla/mp4parse-rust#412 · 2 comments ·
All issues in mozilla/mp4parse-rust
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
state:needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
zed-industries/zed#64680 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
RustPython/RustPython#8802 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
TheLarkInn/aipm#2390 ·