Skip to content

Commit

Permalink
nostr: fix JsonUtil::try_as_pretty_json method
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Kishimoto <[email protected]>
  • Loading branch information
yukibtc committed Aug 20, 2024
1 parent c994895 commit 7baf8df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@

* nostr: fix `TagStanderd::to_vec` ([nanikamado])
* nostr: fix broken intra doc links ([Yuki Kishimoto])
* nostr: fix `JsonUtil::try_as_pretty_json` method ([Yuki Kishimoto])

### Removed

Expand Down
2 changes: 1 addition & 1 deletion crates/nostr/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ where
/// Serialize as pretty JSON string
#[inline]
fn try_as_pretty_json(&self) -> Result<String, Self::Err> {
Ok(serde_json::to_string(self)?)
Ok(serde_json::to_string_pretty(self)?)
}
}

Expand Down

0 comments on commit 7baf8df

Please sign in to comment.