pinakes-core: map serde_json errors to Serialization variant in export

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I77c27639ea1aca03d54702e38fc3ef576a6a6964
This commit is contained in:
raf 2026-03-11 17:23:08 +03:00
commit 0c9b71346d
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF

View file

@ -42,7 +42,7 @@ pub async fn export_library(
match format { match format {
ExportFormat::Json => { ExportFormat::Json => {
let json = serde_json::to_string_pretty(&items).map_err(|e| { let json = serde_json::to_string_pretty(&items).map_err(|e| {
crate::error::PinakesError::Config(format!("json serialize: {e}")) crate::error::PinakesError::Serialization(format!("json serialize: {e}"))
})?; })?;
std::fs::write(destination, json)?; std::fs::write(destination, json)?;
}, },