- Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed as not planned
Labels
A-lintArea: New lintsArea: New lints
Description
What it does
Strips out unnecessary path qualifiers on types/functions/structs when the module they are being imported from is already in scope.
See bevyengine/bevy#10749 for an example of this in practice, powered by RustRover's refactoring tools.
Advantage
- clarifies that this is the standard, already imported form
- reduces noise and saves characters
Drawbacks
Maybe makes imports less clear in cases where you really want to be explicit?
This is a weaker version of absolute_paths, focused on redundancy rather than enforcing a universal style. In some cases, you might want the latter.
Example
use bevy::prelude::*; let world = bevy::ecs::World::new();
Could be written as:
use bevy::prelude::*; let world = World::new();
Metadata
Metadata
Assignees
Labels
A-lintArea: New lintsArea: New lints