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:
parent
15b005cef0
commit
0c9b71346d
1 changed files with 1 additions and 1 deletions
|
|
@ -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)?;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue