-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add conversion from tempfile::TempDir to assert_fs::TempDir #54
Comments
I made a non-configurable In #46, @volks73 use case was to call
On the other hand, if we expose So I'm a bit concerned about how much value this adds in consequence to the cost. |
Yes, the more I think about this, it is probably an extreme edge case and the other workarounds are perfectly reasonable, but more for my own edification, can you explain a little bit more about the following consequence:
Why is it bad to have Again, this is just for my own benefit as I try to learn and apply various crate and API conventions for my own packages and projects. Thank you! |
Currently, However, if we create a |
I think at this point I'm going to err on the side of #48 and close this. |
As mentioned and requested in #48, sometimes it might be necessary or needed to customize the temporary directory generated during tests. For example, the tempfile crate provides the
tempfile::Builder
type for customizing the temporary directory. Similar customizations are not possible with theassert_fs::TempDir
.As a way to avoid re-implementation of the
tempfile::Builder
customizations, aFrom
implementation could be added to theassert_fs::TempDir
type. Two separateFrom
implementations could be added: (1)tempfile::TempDir
and (2)tempfile::Builder
. This would allow for the following:This also means the complementary
Into
implementations would also exist.I do recognize the majority use-case is to just create a "default" temporary directory, but this would add some functionality and flexibility for more uncommon test cases without having to re-implement anything.
The text was updated successfully, but these errors were encountered: