First rust project: tool which finds the "optimal inexact match between a regex-like pattern and a text"

HI,

I've been trying to learn rust, I've been working on a tool (GitHub - SamRoberts/fuzzy_rust: Fuzzy finds the optimal inexact match between a regex-like pattern and a text.) which does a fuzzy match between a (subset of) a regex expression and a text. E.g.

fuzzy -i "Helloo* World" "Helloooooo world"
Helloooooo [-W-]{+w+}orld

I would love to get "idiomatic rust coding"-style feedback on this. E.g.

  • Am I using traits appropriately? (back when I used to dabble in Haskell a common beginner issue was using type-classes for everything)
  • Am I copying structs around when I could easily use references instead?
  • Or any other feedback you feel like, of course! :slight_smile:

It's not a small project, but I hope it's at least a little bit interesting?

Anyway, please let me know if you have any feedback: GitHub - SamRoberts/fuzzy_rust: Fuzzy finds the optimal inexact match between a regex-like pattern and a text. :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.