4 ms·
I like to include traits closer to where they are used, to help with this. For example, “use cgmath::InnerSpace as _;” at the start of a small function. The “_”
by kvark 5y ago
I like to include traits closer to where they are used, to help with this. For example, “use cgmath::InnerSpace as _;” at the start of a small function. The “_” is a strong signal that I don’t need the type itself, but only properties of this trait.
- vlmutolo 5y agoThis is the first suggestion I've seen in this thread that actually helps to make the code more readable.