You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.
I tend to use vi a lot for editing, and it's not really great at auto-importing. Using super::* in-crate thus saves me a lot of time.
Yes, it appears you can create logically ambiguous name resolutions that the compiler thinks are unambiguous, which is undesirable. In practice this is rarely a problem, at least in my experience. It's hard to imagine such a thing not causing a compiler error, and it's easily fixed with a few more use statements.
All that being said, now that this project is more fleshed out I'm not opposed to doing away with the use super::*; and importing everything explicitly. It would be nice if there was an automated way to do this.
Almost all modules have wildcard imports
which I would consider bad practice, because it is harder to see which files/modules a file depends on.
It could also cause unexpected overwrites of imports, if one is not careful about it.
For example:
file.rs
other.rs
lib.rs
third.rs
but if one removes the
other::Wrapper
the behavior ofthird::hello
would change without anyone noticing.The text was updated successfully, but these errors were encountered: