Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split lib.rs into separate modules #487

Merged
merged 8 commits into from Oct 30, 2022
Merged

Split lib.rs into separate modules #487

merged 8 commits into from Oct 30, 2022

Conversation

mgeisler
Copy link
Owner

@mgeisler mgeisler commented Oct 29, 2022

The lib.rs file has grown very big over the years and it's now just over 2k lines. This PR moves the functions and tests into a number of separate modules, leaving just the top-level documentation in lib.rs. The public API is unchanged and I hope this will make it easier to maintain the crate going forward.

@mgeisler mgeisler force-pushed the modules branch 3 times, most recently from bb3aa20 to 15bd827 Compare October 30, 2022 09:35
This is an internal module, so the API remains unchanged as
`textwrap::Options`.
This allows the to be sorted nicely.
The public API is kept unchanged.
This let’s `cargo doc` (and human readers) disambiguate them.
This brings the number of lines in `lib.rs` down to less than 1k.

The split between unit tests for `fill` and `wrap` could be cleaned
up: right now we test on either level depending on what looks better
in the test.
@mgeisler mgeisler merged commit 583b9b1 into master Oct 30, 2022
@mgeisler mgeisler deleted the modules branch October 30, 2022 11:07
@mgeisler mgeisler mentioned this pull request Oct 30, 2022
@github-actions github-actions bot mentioned this pull request Feb 11, 2024
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.

None yet

1 participant