sheep
sheep copied to clipboard
Named format uses `Vec<String>` instead of `&[String]`
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.
@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?