Open Benjamin-L opened 5 years ago
@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 =
Oh, I think you're right about this. Should I leave the issue open for when GAT's get implemented?
Currently,
AmethystNamedFormat
takes extra options in the formVec<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]
withAmethystNamedFormat<S> where S: Deref<Target=str>
.I'm happy to write up a PR for this if people think it's a good idea.