Skip to content

Commit

Permalink
refactor(source): Remove unused RecursivePathSource::root_package
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed May 30, 2024
1 parent f18e78b commit e1ae47c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/cargo/sources/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,21 +250,6 @@ impl<'gctx> RecursivePathSource<'gctx> {
}
}

/// Gets the package on the root path.
pub fn root_package(&mut self) -> CargoResult<Package> {
trace!("root_package; source={:?}", self);

self.update()?;

match self.packages.iter().find(|p| p.root() == &*self.path) {
Some(pkg) => Ok(pkg.clone()),
None => Err(internal(format!(
"no package found in source {:?}",
self.path
))),
}
}

/// Returns the packages discovered by this source. It may walk the
/// filesystem if package information haven't yet updated.
pub fn read_packages(&self) -> CargoResult<Vec<Package>> {
Expand Down

0 comments on commit e1ae47c

Please sign in to comment.