Skip to content

Rename Book.sections to Book.items#2813

Merged
ehuss merged 1 commit into
rust-lang:masterfrom
ehuss:rename-book-sections
Aug 23, 2025
Merged

Rename Book.sections to Book.items#2813
ehuss merged 1 commit into
rust-lang:masterfrom
ehuss:rename-book-sections

Conversation

@ehuss
Copy link
Copy Markdown
Contributor

@ehuss ehuss commented Aug 23, 2025

This renames the "sections" list to "items". In practice, this list has contained more than just "sections" since parts were added. Also, the rest of the code consistently uses the term "items", since the values it contains are called BookItems. Finally, the naming has always been a little confusing to me.

This is a very disruptive change, and I'm not doing it lightly. However, since there are a number of other API changes going into 0.5, I think now is an ok time to change this.

This renames the "sections" list to "items". In practice, this list has
contained more than just "sections" since parts were added. Also, the
rest of the code consistently uses the term "items", since the values it
contains are called `BookItem`s. Finally, the naming has always been a
little confusing to me.

This is a very disruptive change, and I'm not doing it lightly. However,
since there are a number of other API changes going into 0.5, I think
now is an ok time to change this.
@ehuss ehuss added the Breaking Change This would require a SemVer breaking change label Aug 23, 2025
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Aug 23, 2025
@ehuss ehuss enabled auto-merge August 23, 2025 01:53
@ehuss ehuss added this pull request to the merge queue Aug 23, 2025
Merged via the queue into rust-lang:master with commit 313be71 Aug 23, 2025
14 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label Aug 23, 2025
crozzy added a commit to crozzy/claircore that referenced this pull request Nov 21, 2025
mdbook changed in the most recent versions to rename sections to items
to better represent the usage, this means the claircore hook also needs
to be updated to work with the latest versions. Note: this means
claircore will no longer work with mdbook versions lower than v0.5.0.
rust-lang/mdBook#2813

Signed-off-by: crozzy <joseph.crosland@gmail.com>
anoadragon453 added a commit to element-hq/synapse that referenced this pull request Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Change This would require a SemVer breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants