Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose &str with 'static lifetimes where possible #27

Closed
MOZGIII opened this issue Jan 30, 2024 · 4 comments
Closed

Expose &str with 'static lifetimes where possible #27

MOZGIII opened this issue Jan 30, 2024 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@MOZGIII
Copy link

MOZGIII commented Jan 30, 2024

Using this crate is a relatively high-perf setting where doing a clone of a string to pass it around it kind of unwanted. It would be great if the crate would allow to just use static references for things that allow it.

For instance: country.un_locale() could easily return &'static str instead of &str.

@MOZGIII MOZGIII changed the title Expose &strs with &'static lifetime where possible Expose &str with 'static lifetime where possible Jan 30, 2024
@MOZGIII MOZGIII changed the title Expose &str with 'static lifetime where possible Expose &str with 'static lifetimes where possible Jan 30, 2024
@pouriya pouriya added the enhancement New feature or request label Feb 5, 2024
@pouriya
Copy link
Owner

pouriya commented Feb 5, 2024

Hmm. yeah. I think we need to change this section. Could you do that?

@MOZGIII
Copy link
Author

MOZGIII commented Feb 5, 2024

I use only a small part of the API surface - so I don't really know where to look for all the instances where this would be relevant. So, I'd avoid taking this task.

@MOZGIII
Copy link
Author

MOZGIII commented Feb 5, 2024

I mean, I suspect there are also other placrs where this would matter, besides the file you linked

@pouriya pouriya added the help wanted Extra attention is needed label Feb 6, 2024
@pouriya
Copy link
Owner

pouriya commented Feb 12, 2024

Done

@pouriya pouriya closed this as completed Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants