pub struct UnusedDeps {
workspace_deps: BTreeSet<String>,
workspace_found_deps: BTreeSet<String>,
crate_deps: BTreeSet<String>,
crate_found_deps: BTreeSet<String>,
dep_matchers: BTreeMap<String, RegexMatcher>,
only_diffed: bool,
searcher: Searcher,
}Fields§
§workspace_deps: BTreeSet<String>All dependency names declared in the workspace.
workspace_found_deps: BTreeSet<String>Workspace dependencies for which a usage has been found so far in source files.
crate_deps: BTreeSet<String>All dependency names declared in the current crate.
crate_found_deps: BTreeSet<String>Dependencies for which a usage has been found so far in source files.
dep_matchers: BTreeMap<String, RegexMatcher>Pre-compiled regex matchers keyed by dependency name, built once for all workspace dependency names and extended lazily for any non-workspace deps encountered in individual crates.
only_diffed: boolWhether we are linting only diffed files (workspace-level check is unreliable in this mode because not all crates are visited).
searcher: SearcherPrebuilt grep searcher to avoid rebuilds
Trait Implementations§
Source§impl Lint for UnusedDeps
impl Lint for UnusedDeps
Source§fn enter_workspace(&mut self, content: &Lintable<DocumentMut>)
fn enter_workspace(&mut self, content: &Lintable<DocumentMut>)
Begin processing a workspace, given the parsed Cargo.toml of the workspace root.
Source§fn enter_crate(&mut self, content: &Lintable<DocumentMut>)
fn enter_crate(&mut self, content: &Lintable<DocumentMut>)
Begin processing a crate, given the parsed Cargo.toml of the crate root.
Source§fn visit_file(&mut self, content: &mut Lintable<String>)
fn visit_file(&mut self, content: &mut Lintable<String>)
Process a Rust source file in the current crate.
Source§fn exit_crate(&mut self, content: &mut Lintable<DocumentMut>)
fn exit_crate(&mut self, content: &mut Lintable<DocumentMut>)
Finish processing a crate, given the parsed Cargo.toml of the crate root.
Source§fn exit_workspace(&mut self, content: &mut Lintable<DocumentMut>)
fn exit_workspace(&mut self, content: &mut Lintable<DocumentMut>)
Finish processing a workspace, given the parsed Cargo.toml of the workspace root.
Auto Trait Implementations§
impl !Freeze for UnusedDeps
impl !RefUnwindSafe for UnusedDeps
impl Send for UnusedDeps
impl !Sync for UnusedDeps
impl Unpin for UnusedDeps
impl UnsafeUnpin for UnusedDeps
impl UnwindSafe for UnusedDeps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more