Skip to content

Commit 4f2b54a

Browse files
committed
add compact constructor for FromatConfiguration
1 parent af7c09f commit 4f2b54a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/parser.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ impl FormatConfiguration {
7878
pub fn default() -> Self {
7979
FormatConfiguration {indent: None, item_separator: ", ".to_string(), key_separator: ": ".to_string(), current_indent: String::with_capacity(64), trailing_comma: TrailingComma::NONE}
8080
}
81+
82+
pub fn compact() -> Self {
83+
FormatConfiguration {indent: None, item_separator: ",".to_string(), key_separator: ":".to_string(), current_indent: String::with_capacity(64), trailing_comma: TrailingComma::NONE}
84+
}
8185
}
8286

8387
impl<'input> JSONKeyValuePair<'input> {

0 commit comments

Comments
 (0)