-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Implement Clone for WalkDir #54
Comments
While
My interest in |
Thanks @epage. I'll add this to the tracking issue 👍 |
With the current implementation, I don't think this is possible, because WalkDirOptions contains an |
I strongly think the walkdir iterator should not impl
|
To be clear, my request is for What is the intention behind |
I guess I should re-word my thoughts:
I think (1) is the most important. If we have (1), then perhaps that will yield answers to (2).
Generally speaking, |
One of the features of cobalt (static site generator) is that it can live update a preview of a site. Currently, when it detects any change, it completely rebuilds the site. Something we're interested in eventually implementing is the ability to do partial rebuilds. One way I'm considering doing this is to load the configuration and rebuild the site for any part of the configuration that is different (another mechanism would handle re-walking if files are deleted / added). I'm not entirely sure yet if I'd be doing equality checks on To put it another way for
I find this interesting feedback into the language. In some respects, closures are syntactic sugar for creating a callable struct. The captured values are effectively members of the struct. Unfortunately, there isn't a way to mark a closure as C++'s way of handling this is the most ideal (allow a wrapper object to only expose a "trait" if an inner object exposes it) but that only works because of the lack of concepts/traits + SFINAE. It'd be hard to translate that over to Rust. |
Even if you could, it would require enforcing that all captured values also satisfy I think I'd suggest building an application specific type for your use case. |
I think we just established that even though So can this be closed then? |
Relevant API guideline
From the discussion: The traits to implement for
WalkDir
are:Clone
The text was updated successfully, but these errors were encountered: