From 22bdfc9d87aeb5ec263c394332ea3ea4c7a6145b Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Mon, 25 Aug 2025 16:00:48 -0700 Subject: [PATCH 1/2] fix: forgejo action --- .forgejo/workflows/test.yml | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index a2bf4f0..b72175c 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -7,15 +7,13 @@ jobs: name: Build and test runs-on: bookworm steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 + - uses: actions/checkout@v5 + + - uses: https://github.com/dtolnay/rust-toolchain@stable with: toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: test - args: --all-features - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: -- --check + components: rustfmt, clippy + + - run: cargo fmt --all -- --check + - run: cargo clippy --all-targets --all-features -- -D warnings + - run: cargo test --all-features From bfac58509a56d6d43d7f900a63209d96ca8c4f6b Mon Sep 17 00:00:00 2001 From: NexVeridian Date: Mon, 25 Aug 2025 16:01:34 -0700 Subject: [PATCH 2/2] chore(clippy): .to_string -> .clone --- src/entity.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entity.rs b/src/entity.rs index ba00353..a4ba8d5 100755 --- a/src/entity.rs +++ b/src/entity.rs @@ -303,7 +303,7 @@ impl Entity { let mut map = BTreeMap::new(); for (key, val) in json_map { map.insert( - Lang(key.to_string()), + Lang(key.clone()), val.as_array() .ok_or(EntityError::ExpectedAliasArray)? .iter() @@ -333,7 +333,7 @@ impl Entity { for (key, val) in json_map { let obj = val.as_object().ok_or(EntityError::ExpectedObject)?; map.insert( - SiteName(key.to_string()), + SiteName(key.clone()), SitelinkValue { title: obj .get("title")