diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index b72175c..a2bf4f0 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -7,13 +7,15 @@ jobs: name: Build and test runs-on: bookworm steps: - - uses: actions/checkout@v5 - - - uses: https://github.com/dtolnay/rust-toolchain@stable + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 with: toolchain: stable - components: rustfmt, clippy - - - run: cargo fmt --all -- --check - - run: cargo clippy --all-targets --all-features -- -D warnings - - run: cargo test --all-features + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check diff --git a/src/entity.rs b/src/entity.rs index a4ba8d5..ba00353 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.clone()), + Lang(key.to_string()), 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.clone()), + SiteName(key.to_string()), SitelinkValue { title: obj .get("title")