Skip to content

Expose raw line and ranges#2

Open
kmicklas wants to merge 1 commit intogkbrk:masterfrom
kmicklas:ranges
Open

Expose raw line and ranges#2
kmicklas wants to merge 1 commit intogkbrk:masterfrom
kmicklas:ranges

Conversation

@kmicklas
Copy link

@kmicklas kmicklas commented Feb 2, 2025

I'd like to use this library with CEDICT embedded as a static string, and then work with &'static strs within my application. The format itself is slice-friendly and doesn't require any copying. However the current API can only expose slices with lifetime bounded by the DictEntry reference itself.

I considered using a trait to express types which can be sliced "by value", but there isn't anything exactly right in std for this and it seems like overkill to create one here. Exposing the raw ranges seems like the simplest solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant