Why does Engine::eval_file_with_scope use PathBuf instead of Path?
Why is the file path passed to Engine::eval_file_with_scope as PathBuf instead of Path? I'm a little surprised by this decision, because it can provoke an extra allocation.
Well, for historical reasons... The API is fixed so I can't easily change it to Path without breaking code.
It probably should be changed to a generic impl Into<Path>
Thanks for the quick response, I hope these changes will come someday. And... Can I contribute to this?
Of course. Your contributions are welcome.
Actually very few people use the file API (I guess) so it may actually not be very risky to change...
But of course being as compatible as possible is best.
I opened the pull request with these changes