We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bd839e commit e668598Copy full SHA for e668598
axum-extra/src/response/erased_json.rs
@@ -57,7 +57,10 @@ impl ErasedJson {
57
pub fn pretty<T: Serialize>(val: T) -> Self {
58
let mut bytes = BytesMut::with_capacity(128);
59
let result = match serde_json::to_writer_pretty((&mut bytes).writer(), &val) {
60
- Ok(()) => Ok(bytes.freeze()),
+ Ok(()) => {
61
+ bytes.put_u8(b'\n');
62
+ Ok(bytes.freeze())
63
+ }
64
Err(e) => Err(Arc::new(e)),
65
};
66
Self(result)
0 commit comments