diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-11-09 14:12:18 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-11-09 14:12:18 +0100 |
| commit | 2efc5f9444402c5ef9db25887f2e95d184af8e05 (patch) | |
| tree | 07f317780bdbe87d633e5340fe87bc604484730d /import/src/wikidata.rs | |
| parent | 6032bfd0fa7cfd10d1bc17e44f91a789aa86efad (diff) | |
| download | jellything-2efc5f9444402c5ef9db25887f2e95d184af8e05.tar jellything-2efc5f9444402c5ef9db25887f2e95d184af8e05.tar.bz2 jellything-2efc5f9444402c5ef9db25887f2e95d184af8e05.tar.zst | |
upgrade deps + clippy
Diffstat (limited to 'import/src/wikidata.rs')
| -rw-r--r-- | import/src/wikidata.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/import/src/wikidata.rs b/import/src/wikidata.rs index 1b7f06e..71eef9a 100644 --- a/import/src/wikidata.rs +++ b/import/src/wikidata.rs @@ -63,6 +63,12 @@ pub mod properties { pub static IMAGE: &str = "P18"; } +impl Default for Wikidata { + fn default() -> Self { + Self::new() + } +} + impl Wikidata { pub fn new() -> Self { let client = ClientBuilder::new() @@ -118,6 +124,6 @@ impl Wikidata { .await .context("wikidata entity")?; - Ok(serde_json::from_str(&json).context("parse wikidata entity")?) + serde_json::from_str(&json).context("parse wikidata entity") } } |