Skip to content

Use new_line after path_meta doc comments - #649

Merged
juntyr merged 1 commit into
ron-rs:masterfrom
LuisFigueroaG:fix/path-meta-doc-new-line
Oct 28, 2026
Merged

juntyr merged 1 commit into
ron-rs:masterfrom
LuisFigueroaG:fix/path-meta-doc-new-line

Conversation

@LuisFigueroaG

Copy link
Copy Markdown
Contributor

The doc comments written for PrettyConfig::path_meta end each line with a hardcoded '\n' instead of config.new_line, so with new_line("\r\n") the output mixes line endings:

(\r\n    name: "Herbert",\r\n    /// age of the pet\n    /// must be within range 0..256\n    age: 7,\r\n)

Everything else in the pretty serializer already uses new_line, so this just writes config.new_line there too. The new test in tests/544_path_meta.rs fails on master and passes with the fix.

cargo test passes with default features, --no-default-features, integer128, indexmap and --all-features. cargo +1.64.0 clippy -- -D warnings is clean for the same feature sets with the minimal-versions lockfile, the full suite also passes on 1.64.0, and cargo fmt --check is clean.

  • I've included my change in CHANGELOG.md

The doc comment lines written for path_meta always ended with a
hardcoded '\n', so with e.g. `new_line: "\r\n"` the output mixed CRLF
and LF line endings. Write config.new_line instead.
@juntyr
juntyr merged commit b41fbce into ron-rs:master Oct 28, 2026
10 checks passed
@juntyr

juntyr commented Oct 28, 2026

Copy link
Copy Markdown
Member

Thanks @LuisFigueroaG!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants