Compare commits

..

No commits in common. "bfac58509a56d6d43d7f900a63209d96ca8c4f6b" and "5dbd43729694057da994b26cbdd6fefc8f2e7f1b" have entirely different histories.

2 changed files with 12 additions and 10 deletions

View file

@ -7,13 +7,15 @@ jobs:
name: Build and test name: Build and test
runs-on: bookworm runs-on: bookworm
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: https://github.com/dtolnay/rust-toolchain@stable
with: with:
toolchain: stable toolchain: stable
components: rustfmt, clippy - uses: actions-rs/cargo@v1
with:
- run: cargo fmt --all -- --check command: test
- run: cargo clippy --all-targets --all-features -- -D warnings args: --all-features
- run: cargo test --all-features - uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check

View file

@ -303,7 +303,7 @@ impl Entity {
let mut map = BTreeMap::new(); let mut map = BTreeMap::new();
for (key, val) in json_map { for (key, val) in json_map {
map.insert( map.insert(
Lang(key.clone()), Lang(key.to_string()),
val.as_array() val.as_array()
.ok_or(EntityError::ExpectedAliasArray)? .ok_or(EntityError::ExpectedAliasArray)?
.iter() .iter()
@ -333,7 +333,7 @@ impl Entity {
for (key, val) in json_map { for (key, val) in json_map {
let obj = val.as_object().ok_or(EntityError::ExpectedObject)?; let obj = val.as_object().ok_or(EntityError::ExpectedObject)?;
map.insert( map.insert(
SiteName(key.clone()), SiteName(key.to_string()),
SitelinkValue { SitelinkValue {
title: obj title: obj
.get("title") .get("title")