[INFO] fetching crate mp4e 1.0.5... [INFO] linting mp4e-1.0.5 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate mp4e 1.0.5 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate mp4e 1.0.5 [INFO] finished tweaking crates.io crate mp4e 1.0.5 [INFO] tweaked toml for crates.io crate mp4e 1.0.5 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate mp4e 1.0.5 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate mp4e 1.0.5 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b01494fd5691b0dbca7d71313fe0029b3bf39044f2bc77d3c5885f626a67679e [INFO] running `Command { std: "docker" "start" "-a" "b01494fd5691b0dbca7d71313fe0029b3bf39044f2bc77d3c5885f626a67679e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b01494fd5691b0dbca7d71313fe0029b3bf39044f2bc77d3c5885f626a67679e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b01494fd5691b0dbca7d71313fe0029b3bf39044f2bc77d3c5885f626a67679e", kill_on_drop: false }` [INFO] [stdout] b01494fd5691b0dbca7d71313fe0029b3bf39044f2bc77d3c5885f626a67679e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c5f1211c96fffca6104e9367618d48ad760dd285ac1e0e7b749c7d7274e58e0e [INFO] running `Command { std: "docker" "start" "-a" "c5f1211c96fffca6104e9367618d48ad760dd285ac1e0e7b749c7d7274e58e0e", kill_on_drop: false }` [INFO] [stderr] Checking mp4e v1.0.5 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mp4e.rs:189:13 [INFO] [stdout] | [INFO] [stdout] 189 | dsi: dsi, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dsi` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mp4e.rs:471:13 [INFO] [stdout] | [INFO] [stdout] 471 | fragment: fragment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `fragment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/util.rs:7:16 [INFO] [stdout] | [INFO] [stdout] 7 | Self { data: data, pos: 0 } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mp4e.rs:189:13 [INFO] [stdout] | [INFO] [stdout] 189 | dsi: dsi, [INFO] [stdout] | ^^^^^^^^ help: replace it with: `dsi` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/mp4e.rs:471:13 [INFO] [stdout] | [INFO] [stdout] 471 | fragment: fragment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `fragment` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/util.rs:7:16 [INFO] [stdout] | [INFO] [stdout] 7 | Self { data: data, pos: 0 } [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `data` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/boxes.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | let mut random_access_count = 0 as u32; [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/boxes.rs:292:21 [INFO] [stdout] | [INFO] [stdout] 292 | if let Some(ref dsi) = dsi.as_ref() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 292 - if let Some(ref dsi) = dsi.as_ref() { [INFO] [stdout] 292 + if let Some(dsi) = dsi.as_ref() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i16` is unnecessary [INFO] [stdout] --> src/boxes.rs:387:27 [INFO] [stdout] | [INFO] [stdout] 387 | cursor.write_all(&(-1 as i16).to_be_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(-1_i16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i16` is unnecessary [INFO] [stdout] --> src/boxes.rs:481:27 [INFO] [stdout] | [INFO] [stdout] 481 | cursor.write_all(&(-1 as i16).to_be_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(-1_i16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/boxes.rs:611:12 [INFO] [stdout] | [INFO] [stdout] 611 | if track.samples.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!track.samples.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/boxes.rs:163:39 [INFO] [stdout] | [INFO] [stdout] 163 | let mut random_access_count = 0 as u32; [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:693:53 [INFO] [stdout] | [INFO] [stdout] 693 | write_mdhd(track.timescale, track.duration, &language, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:768:37 [INFO] [stdout] | [INFO] [stdout] 768 | write_mdia(track, fragment, &language, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:803:25 [INFO] [stdout] | [INFO] [stdout] 803 | write_track(&language, fragment, track, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this pattern creates a reference to a reference [INFO] [stdout] --> src/boxes.rs:292:21 [INFO] [stdout] | [INFO] [stdout] 292 | if let Some(ref dsi) = dsi.as_ref() { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 292 - if let Some(ref dsi) = dsi.as_ref() { [INFO] [stdout] 292 + if let Some(dsi) = dsi.as_ref() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i16` is unnecessary [INFO] [stdout] --> src/boxes.rs:387:27 [INFO] [stdout] | [INFO] [stdout] 387 | cursor.write_all(&(-1 as i16).to_be_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(-1_i16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | /// the duration in sample count, not bytes. For example, if you [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:244:9 [INFO] [stdout] | [INFO] [stdout] 244 | /// have 1024 PCM samples that were encoded, you pass 1024 here. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:245:9 [INFO] [stdout] | [INFO] [stdout] 245 | /// If you only know the duration in milliseconds, you can estimate [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | /// the sample count using the formula: duration_ms * sample_rate / 1000. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | /// For example, with a 48kHz sample rate and 21.33ms duration: [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | /// samples = 21.33 * 48000 / 1000 = 1024 samples. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `i16` is unnecessary [INFO] [stdout] --> src/boxes.rs:481:27 [INFO] [stdout] | [INFO] [stdout] 481 | cursor.write_all(&(-1 as i16).to_be_bytes())?; [INFO] [stdout] | ^^^^^^^^^^^ help: try: `(-1_i16)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:552:24 [INFO] [stdout] | [INFO] [stdout] 552 | if !video_track.vps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.vps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:553:28 [INFO] [stdout] | [INFO] [stdout] 553 | && !video_track.sps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.sps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:554:28 [INFO] [stdout] | [INFO] [stdout] 554 | && !video_track.vps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.vps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/mp4e.rs:558:28 [INFO] [stdout] | [INFO] [stdout] 558 | if nalu_type >= HEVC_NAL_BLA_W_LP && nalu_type <= HEVC_NAL_CRA_NUT { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(HEVC_NAL_BLA_W_LP..=HEVC_NAL_CRA_NUT).contains(&nalu_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:638:24 [INFO] [stdout] | [INFO] [stdout] 638 | if !video_track.sps.is_none() && !video_track.pps.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.sps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:638:54 [INFO] [stdout] | [INFO] [stdout] 638 | if !video_track.sps.is_none() && !video_track.pps.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.pps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/mp4e.rs:712:31 [INFO] [stdout] | [INFO] [stdout] 712 | self.write_pos += end_pos as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `end_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/mp4e.rs:714:31 [INFO] [stdout] | [INFO] [stdout] 714 | self.write_pos += box_size as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `box_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/mp4e.rs:731:36 [INFO] [stdout] | [INFO] [stdout] 731 | random_access: if let SampleType::RandomAccess = sample_type { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 732 | | true [INFO] [stdout] 733 | | } else { [INFO] [stdout] 734 | | false [INFO] [stdout] 735 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 731 - random_access: if let SampleType::RandomAccess = sample_type { [INFO] [stdout] 732 - true [INFO] [stdout] 733 - } else { [INFO] [stdout] 734 - false [INFO] [stdout] 735 - }, [INFO] [stdout] 731 + random_access: matches!(sample_type, SampleType::RandomAccess), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/boxes.rs:611:12 [INFO] [stdout] | [INFO] [stdout] 611 | if track.samples.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!track.samples.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:693:53 [INFO] [stdout] | [INFO] [stdout] 693 | write_mdhd(track.timescale, track.duration, &language, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:768:37 [INFO] [stdout] | [INFO] [stdout] 768 | write_mdia(track, fragment, &language, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/boxes.rs:803:25 [INFO] [stdout] | [INFO] [stdout] 803 | write_track(&language, fragment, track, cursor)?; [INFO] [stdout] | ^^^^^^^^^ help: change this to: `language` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:243:9 [INFO] [stdout] | [INFO] [stdout] 243 | /// the duration in sample count, not bytes. For example, if you [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:244:9 [INFO] [stdout] | [INFO] [stdout] 244 | /// have 1024 PCM samples that were encoded, you pass 1024 here. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:245:9 [INFO] [stdout] | [INFO] [stdout] 245 | /// If you only know the duration in milliseconds, you can estimate [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:246:9 [INFO] [stdout] | [INFO] [stdout] 246 | /// the sample count using the formula: duration_ms * sample_rate / 1000. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:247:9 [INFO] [stdout] | [INFO] [stdout] 247 | /// For example, with a 48kHz sample rate and 21.33ms duration: [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/mp4e.rs:248:9 [INFO] [stdout] | [INFO] [stdout] 248 | /// samples = 21.33 * 48000 / 1000 = 1024 samples. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:552:24 [INFO] [stdout] | [INFO] [stdout] 552 | if !video_track.vps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.vps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:553:28 [INFO] [stdout] | [INFO] [stdout] 553 | && !video_track.sps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.sps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:554:28 [INFO] [stdout] | [INFO] [stdout] 554 | && !video_track.vps.is_none() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.vps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/mp4e.rs:558:28 [INFO] [stdout] | [INFO] [stdout] 558 | if nalu_type >= HEVC_NAL_BLA_W_LP && nalu_type <= HEVC_NAL_CRA_NUT { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `(HEVC_NAL_BLA_W_LP..=HEVC_NAL_CRA_NUT).contains(&nalu_type)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:638:24 [INFO] [stdout] | [INFO] [stdout] 638 | if !video_track.sps.is_none() && !video_track.pps.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.sps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/mp4e.rs:638:54 [INFO] [stdout] | [INFO] [stdout] 638 | if !video_track.sps.is_none() && !video_track.pps.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `video_track.pps.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/mp4e.rs:712:31 [INFO] [stdout] | [INFO] [stdout] 712 | self.write_pos += end_pos as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `end_pos` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`u64` -> `u64`) [INFO] [stdout] --> src/mp4e.rs:714:31 [INFO] [stdout] | [INFO] [stdout] 714 | self.write_pos += box_size as u64; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `box_size` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/mp4e.rs:731:36 [INFO] [stdout] | [INFO] [stdout] 731 | random_access: if let SampleType::RandomAccess = sample_type { [INFO] [stdout] | ____________________________________^ [INFO] [stdout] 732 | | true [INFO] [stdout] 733 | | } else { [INFO] [stdout] 734 | | false [INFO] [stdout] 735 | | }, [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 731 - random_access: if let SampleType::RandomAccess = sample_type { [INFO] [stdout] 732 - true [INFO] [stdout] 733 - } else { [INFO] [stdout] 734 - false [INFO] [stdout] 735 - }, [INFO] [stdout] 731 + random_access: matches!(sample_type, SampleType::RandomAccess), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s [INFO] running `Command { std: "docker" "inspect" "c5f1211c96fffca6104e9367618d48ad760dd285ac1e0e7b749c7d7274e58e0e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c5f1211c96fffca6104e9367618d48ad760dd285ac1e0e7b749c7d7274e58e0e", kill_on_drop: false }` [INFO] [stdout] c5f1211c96fffca6104e9367618d48ad760dd285ac1e0e7b749c7d7274e58e0e