Support AsRef instead of &Path for path parameters
Closed this issue · 3 comments
rope-hmg commented
Would it be possible to change the definition of the Args
struct from &'a [&'a Path]
to something like &'a [P]
where P: AsRef<Path>
?
I have a Vec<PathBuf>
that comes from reading a config file. I would like to be able to just pass it to flatc as Args{ inputs: &inputs[..], ... }
.
Thanks :)
frol commented
I think so... Can you submit a PR? I will be able to merge and release a new version in 5 hours
rope-hmg commented
Sure. I'm just about to head home, so I'll give it a go in about 2 hours or so.
rope-hmg commented
So, I had a go at writing this and I'm not sure how to do it, but I did realised how to solve my issue without modifying your code.
I'll close this issue for now then.