From 7824e2626c218c28f7003703e595e8e055c24b9d Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Sat, 18 Jan 2025 00:53:26 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20`--features=20load-onnxruntime`?= =?UTF-8?q?=E3=81=A7Clippy=E3=82=92=E3=81=8B=E3=81=91=E3=82=8B=20(#925)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `compatible_engine`に対してもClippyがかかるようにする。 --- .github/workflows/test.yml | 4 ++-- crates/voicevox_core_c_api/src/compatible_engine.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2a518cd72..43db87dbb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -72,8 +72,8 @@ jobs: with: python-version: "3.10" - uses: Swatinem/rust-cache@v2 - - run: cargo clippy -v --tests -- -D clippy::all -D warnings --no-deps - - run: cargo clippy -v -- -D clippy::all -D warnings --no-deps + - run: cargo clippy -v --features load-onnxruntime --tests -- -D clippy::all -D warnings --no-deps + - run: cargo clippy -v --features load-onnxruntime -- -D clippy::all -D warnings --no-deps - run: cargo clippy -v -p voicevox_core -p voicevox_core_c_api --features link-onnxruntime --tests -- -D clippy::all -D warnings --no-deps - run: cargo clippy -v -p voicevox_core -p voicevox_core_c_api --features link-onnxruntime -- -D clippy::all -D warnings --no-deps - run: cargo fmt -- --check diff --git a/crates/voicevox_core_c_api/src/compatible_engine.rs b/crates/voicevox_core_c_api/src/compatible_engine.rs index 8f8feec2e..793a224c8 100644 --- a/crates/voicevox_core_c_api/src/compatible_engine.rs +++ b/crates/voicevox_core_c_api/src/compatible_engine.rs @@ -96,7 +96,7 @@ static VOICE_MODEL_SET: LazyLock = LazyLock::new(|| { .and_then(|entries| entries.collect::, _>>()) .unwrap_or_else(|e| panic!("{}が読めませんでした: {e}", root_dir.display())) .into_iter() - .filter(|entry| entry.path().extension().map_or(false, |ext| ext == "vvm")) + .filter(|entry| entry.path().extension().is_some_and(|ext| ext == "vvm")) .map(|entry| voicevox_core::blocking::VoiceModelFile::open(entry.path()).map(Arc::new)) .collect::>() .unwrap()