Skip to content

Commit 666c199

Browse files
committed
refactor(source): Remove unused RecursivePathSource::root_package
1 parent e1d2d8f commit 666c199

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/cargo/sources/path.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -250,21 +250,6 @@ impl<'gctx> RecursivePathSource<'gctx> {
250250
}
251251
}
252252

253-
/// Gets the package on the root path.
254-
pub fn root_package(&mut self) -> CargoResult<Package> {
255-
trace!("root_package; source={:?}", self);
256-
257-
self.update()?;
258-
259-
match self.packages.iter().find(|p| p.root() == &*self.path) {
260-
Some(pkg) => Ok(pkg.clone()),
261-
None => Err(internal(format!(
262-
"no package found in source {:?}",
263-
self.path
264-
))),
265-
}
266-
}
267-
268253
/// Returns the packages discovered by this source. It may walk the
269254
/// filesystem if package information haven't yet updated.
270255
pub fn read_packages(&self) -> CargoResult<Vec<Package>> {

0 commit comments

Comments
 (0)