|
|
|
|
|
by coderedart
1205 days ago
|
|
If an import is used rarely, then i prefer qualifying paths instead of importing them. This is especially true when there's similarly named items from different paths. Best example is `Result`/`Error` types. eg: std::io::Result vs normal default Result vs other crate's Result type. Another example would be math types like Vec2 between game engine and egui. String in mlua vs std rust etc.. Usually you can get around this by importing it with a different name like `use mlua::String as LuaString`. but it is still something that you need to actively do. |
|