Compare commits

...

2 commits

Author SHA1 Message Date
bfac58509a
chore(clippy): .to_string -> .clone
All checks were successful
Build/test / Build and test (push) Successful in 2m16s
2025-08-25 16:01:35 -07:00
22bdfc9d87
fix: forgejo action 2025-08-25 16:01:07 -07:00
2 changed files with 10 additions and 12 deletions

View file

@ -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

View file

@ -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")