Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Set width=-1 on libyaml emitter
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Sep 2, 2022
1 parent 4efbe50 commit 53ccded
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/libyaml/emitter.rs
Expand Up @@ -70,6 +70,7 @@ impl<'a> Emitter<'a> {
panic!("malloc error: {}", libyaml::Error::emit_error(emitter));
}
sys::yaml_emitter_set_unicode(emitter, true);
sys::yaml_emitter_set_width(emitter, -1);
addr_of_mut!((*owned.ptr).write).write(write);
addr_of_mut!((*owned.ptr).write_error).write(None);
sys::yaml_emitter_set_output(emitter, write_handler, owned.ptr.cast());
Expand Down
4 changes: 1 addition & 3 deletions tests/test_serde.rs
Expand Up @@ -542,9 +542,7 @@ fn test_long_string() {
};

let yaml = indoc! {"
string: word word word word word word word word word word word word word word word
word word word word word word word word word word word word word word word word
word word word word
string: word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word word
"};

test_serde(&thing, yaml);
Expand Down

0 comments on commit 53ccded

Please sign in to comment.