You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if there is any particular reason why Str and Subsequence 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 changing Str::new and Subsequence::new to take an AsRef<[u8]> seems to work fine.
The text was updated successfully, but these errors were encountered:
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.
jfolz
added a commit
to jfolz/fst
that referenced
this issue
Jul 25, 2024
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.The text was updated successfully, but these errors were encountered: