Open jfolz opened 1 month ago
I think it's just an oversight. I'd be willing to accept a PR that adds impl From<&'a [u8]> for {Str,Subsequence}
. I realize that we could just modify new
to accept an AsRef<[u8]>
, but this is susceptible to inference failures.
I was wondering if there is any particular reason why
Str
andSubsequence
automata can only be created from strings. The other parts of the API that I've looked at so far all take arbitrary byte sequences. I'm still quite new to Rust, but changingStr::new
andSubsequence::new
to take anAsRef<[u8]>
seems to work fine.