Lukas Kalbertodt
4533f2b2d4
Fix visibility of template module and items
...
The trait and `template::format` are now crate-private as I don't want
to expose that API surface (alongside the `TomlFormatter` types).
2022-10-21 12:39:41 +02:00
Lukas Kalbertodt
a784e6ee64
Rename format to template (except template::format())
2022-10-21 12:02:13 +02:00
Lukas Kalbertodt
6a9ccd4e22
Do major refactor of format code
...
This gets rid of a lot of duplicated logic that was previously
copy&pasted. This commit alos:
- Makes it easier to implement new formats
- Gets rid of a few bugs
- Makes the system more flexible (more options)
- Adds a lot of additional tests
2022-10-19 17:12:32 +02:00
Lukas Kalbertodt
44f59f415a
Implement Serialize for meta::Expr and use it in PrintExpr
...
This probably fixes a few edge case bugs (float infinity and stuff) and
results in less code.
2022-10-19 17:10:17 +02:00
Lukas Kalbertodt
4f5c458150
Add YAML formatting tests
2022-10-19 10:12:25 +02:00
Lukas Kalbertodt
736584ad9d
Fix incorrect newlines in yaml::format
2022-10-19 10:11:33 +02:00
Lukas Kalbertodt
dd55a17b14
Show env key in config template
2022-10-18 16:07:51 +02:00
Lukas Kalbertodt
f0895a8b2f
Add support for array default values
2022-10-17 11:29:38 +02:00
Lukas Kalbertodt
5c3315b015
Move to Rust edition 2021
2022-10-14 16:42:49 +02:00
Lukas Kalbertodt
1c6ecdd4ad
Fix doctests using derive
...
See https://github.com/rust-lang/rust/issues/83583
2022-03-30 17:38:39 +02:00
Lukas Kalbertodt
cc1a0eba5e
Minor documentation improvements
2021-07-27 16:20:24 +02:00
Lukas Kalbertodt
0bc105b22d
Add yaml::format
2021-07-27 15:05:07 +02:00