Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Deref and Into #4

Closed
Yamakaky opened this issue Aug 6, 2015 · 1 comment
Closed

Deref and Into #4

Yamakaky opened this issue Aug 6, 2015 · 1 comment

Comments

@Yamakaky
Copy link

Yamakaky commented Aug 6, 2015

Did you consider implementing Deref<Target=Path> and Into<PathBuf> instead of the methods into_path() and path() ?

@alexcrichton
Copy link
Contributor

We don't want to implement Deref as it's far too powerful for this situation, but implementing Into should be fine! This is just copied from the very old in-tree implementation and when it was written the conversion traits didn't exist.

Feel free to submit a PR adding the Into impl!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants