Repository navigation
v0.2.0
v0.2.0 (2025-07-07)
We have made significant refactoring of the codebase to optimize readability, make naming more intuitive, and added new features.
There are a large number of API changes, please check the code to understand the migration.
Added
DocBuilder::when_group_flat(equivalent tonil.flat_alt(self)) andDocBuilder::when_group_break(equivalent toself.flat_alt(nil))DocAllocator::spaces(create a document of n spaces)DocBuilder::repeat(repeat self n times)Doc::PartialUnionvariant andDocBuilder::partial_union(likeunionbut only tries fitting on the first line)Doc::Flattenvariant andDocBuilder::flatten(force the document to always render flat)Arena::lenandArena::is_empty
Changed
- Bump Rust edition to 2021
- Upgrade
unicode-widthto 0.2 - Rename some variants of
Docfor clarity (breaking change) - Rename the printing function
Doc::pretty→Doc::printto avoid ambiguity (breaking change) - Make
Debugoutput forDocmore compact and fix matching ofSoftLine
Removed
- Removed
Affixes - Drop
Doc:Annotatedandtermcolorfeatures (breaking change)
Full Changelog: v0.1.0...v0.2.0