Skip to content

Panic condition documentation consistency #28384

Closed
@numberten

Description

@numberten

I noticed that the formatting of panic conditions in the documentation of a lot of functions seems to be inconsistent. Specifically it varies between simple warnings in the description of the function and 'Panics' subheaders with the panic condition listed below.

A good example being the difference between split_at and chunks_mut here.

I like that headers make it very explicit (visually) where the panic conditions in a function call are, but they can also lead to confusion since the same header used multiple times on a given page makes any links to them (via url#Header) direct to the topmost 'Panic' header.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions