Skip to content

Add helpful message to division-by-zero panic #739

@Kixunil

Description

@Kixunil

Here:

assert!(your_bits != 0);

"your_bits != 0" is not a clear message. We can improve it by changing the line to assert!(your_bits != 0, "attempted to divide {} by zero", self);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions