about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-21 19:40:57 +0000
committerbors <bors@rust-lang.org>2014-08-21 19:40:57 +0000
commitc509f79f058200e45c374857bcf78b1a0f1d482b (patch)
treee3e32e060505b008d1bbbfc33e32352c5e87ed59 /src/rustllvm/RustWrapper.cpp
parentf92015f71b3a49abd490e704a011d14786f6bf87 (diff)
parent1028120c40018763de11a81d0bf9bc981622d0ae (diff)
downloadrust-c509f79f058200e45c374857bcf78b1a0f1d482b.tar.gz
rust-c509f79f058200e45c374857bcf78b1a0f1d482b.zip
auto merge of #16601 : cybergeek94/rust/master, r=alexcrichton
Previously, `PrettyEncoder` indented a magic constant of 2 spaces per level, which may be fine for most uses but in my use case I would like to allow the user to specify the indent step for the outputted JSON in my program.

This is small change that does not break any existing code whatsoever, and does not change the behavior of existing uses. `PrettyEncoder::new()` still uses the default of 2.

I couldn't think of any simple tests for this change. The obvious one would be to check the outputted JSON for the correct number of spaces per indent level, but I think that would be more complex than the actual change itself and test little besides correctness and consistency, which can be verified visually. There's already a test for correct parsing of pretty-printed JSON that should still pass with this change.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions