From 29de3d5372d9f50e46ca158aabad609b30f0f6cc Mon Sep 17 00:00:00 2001 From: Romane Lafon Date: Thu, 24 Oct 2024 17:24:44 +0200 Subject: [PATCH 1/3] update Rust version in CI and pin it for fmt, clippy and tarpaulin --- .github/workflows/main.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c2dd84..cc0e68a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,14 +24,16 @@ jobs: fail-fast: false matrix: rust: [ - 1.71.0, - 1.72.0, 1.73.0, 1.74.0, 1.75.0, 1.76.0, 1.77.0, 1.78.0, + 1.79.0, + 1.80.0, + 1.81.0, + 1.82.0, stable, beta, nightly @@ -61,7 +63,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.82.0 default: true components: rustfmt @@ -82,7 +84,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.82.0 default: true components: clippy @@ -102,7 +104,7 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable + toolchain: 1.82.0 default: true - name: Install tarpaulin From 18dded00e70ad758afc653e05f6465e6bcc2459f Mon Sep 17 00:00:00 2001 From: Romane Lafon Date: Thu, 24 Oct 2024 17:26:56 +0200 Subject: [PATCH 2/3] add check-cfg in build (since Rust 1.80) --- build.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/build.rs b/build.rs index 055a9e4..78266a3 100644 --- a/build.rs +++ b/build.rs @@ -46,6 +46,7 @@ fn main() { _ => None, }; + println!("cargo:rustc-check-cfg=cfg(ffmpeg_4_0, ffmpeg_4_1, ffmpeg_4_2, ffmpeg_4_3, ffmpeg_4_4, ffmpeg_5_0, ffmpeg_5_1)"); if let Some(ffmpeg_version) = ffmpeg_version { // println!("cargo:warning={}", ffmpeg_version); println!("cargo:rustc-cfg={ffmpeg_version}"); From 787ab166bb607eb8d56fdf464bb1f0a0a2cfd668 Mon Sep 17 00:00:00 2001 From: Romane Lafon Date: Thu, 24 Oct 2024 17:27:18 +0200 Subject: [PATCH 3/3] fix clippy warning --- src/stream.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stream.rs b/src/stream.rs index d382e5f..301c5d1 100644 --- a/src/stream.rs +++ b/src/stream.rs @@ -59,7 +59,7 @@ impl Stream { for _i in 0..4 { let character = codec_tag & 0xFF; if let Some(c) = char::from_u32(character) { - codec_tag_str.push_str(&c.to_string()); + codec_tag_str.push(c); } codec_tag >>= 8; }