Skip to content

Const width helper function #78

Open

Description

@lunyav

Id be interested in a helper function (since traits cant have const fns atm) which can evaluate the width of a &str (and char) at compile time. I could even propose a PR for that if others think this is a nice idea. And maybe even as an optional feature.

Activity

  1. Manishearth commented on Jul 14, 2025

    @Manishearth
    Member

    If it would be rather straightforward I'm in favor.

  2. lunyav commented on Jul 17, 2025

    @lunyav
    Author

    Ive looked into it and found out that we would need rust-lang/rust#63997 solved (for making a const binary_search implementation) or generally have const traits. I could create a PR for my current effort, making many internal fns const.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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