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

Named format uses Vec<String> instead of &[String] #13

Open
olivia-fl opened this issue Jul 24, 2019 · 2 comments
Open

Named format uses Vec<String> instead of &[String] #13

olivia-fl opened this issue Jul 24, 2019 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@olivia-fl
Copy link

Currently, AmethystNamedFormat takes extra options in the form Vec<String>. This is suboptimal since it requires moving the whole container and cloning it if it needs to be reused. Instead it could be &[String], or even &[S] with AmethystNamedFormat<S> where S: Deref<Target=str>.

I'm happy to write up a PR for this if people think it's a good idea.

@basil-cow
Copy link
Contributor

@Benjamin-L correct me if I'm wrong, but I believe it's impossible without GAT's, since &[String] require lifetime specifier and you can't have generic parameters in type =

@happenslol happenslol added the enhancement New feature or request label Jul 31, 2019
@happenslol happenslol added the help wanted Extra attention is needed label Aug 9, 2019
@olivia-fl
Copy link
Author

Oh, I think you're right about this. Should I leave the issue open for when GAT's get implemented?

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

3 participants