uiri / SEGIMAP

IMAP (and LMTP) Server written in Rust
MIT License
32 stars 6 forks source link

Remove uses of regex library #25

Open indiv0 opened 7 years ago

indiv0 commented 7 years ago

This line will contain our last regex usage once #24 lands. We should compare the performance to a nom-based parser (if it fits in this use-case), and remove the regex lib if necessary.

This would let us remove the regex library as a dependency entirely.

uiri commented 7 years ago

You missed a spot in src/util.rs.

The one you missed is fairly easy to replace with String::starts_with

The one you highlight in the session submodule of the user module is rather difficult to replace with string operations. It contains optional path separators between the components that it is looking for so it would need to be replaced with 4 strings (without either separators, with the first, with the second, with both separator).

Closing as WONTFIX; re-open if you have any objections to or see any flaws in my reasoning.

indiv0 commented 7 years ago

With string-based operations it might be difficult, but I think it's still doable with nom. I'd still like to at least give it a try.