Skip to content

Match: show (only?) matched text in Debug output #514

Closed
@masklinn

Description

@masklinn

The current output when debug-printing a Match (especially from a large haystack) is pretty terrifying as it shows the entire source string, and unless one's taken a gander at the underlying implementation it looks like way more stuff has been matched than expected and the pattern is completely wrong. I've done exactly that several time, and every time I forget about this thing and wonder why my patterns are broken

Alternatively, maybe implement Display or Deref to an str so one can just println!-it and see the result?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions