Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/uv-distribution/src/source/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1806,8 +1806,7 @@ pub fn prune(cache: &Cache) -> Result<Removal, Error> {
// directories.
let revision = entry.path().join("revision.http");
if revision.is_file() {
let pointer = HttpRevisionPointer::read_from(revision)?;
if let Some(pointer) = pointer {
if let Ok(Some(pointer)) = HttpRevisionPointer::read_from(revision) {
// Remove all sibling directories that are not referenced by the pointer.
for sibling in entry.path().read_dir().map_err(Error::CacheRead)? {
let sibling = sibling.map_err(Error::CacheRead)?;
Expand All @@ -1832,8 +1831,7 @@ pub fn prune(cache: &Cache) -> Result<Removal, Error> {
// directories.
let revision = entry.path().join("revision.rev");
if revision.is_file() {
let pointer = LocalRevisionPointer::read_from(revision)?;
if let Some(pointer) = pointer {
if let Ok(Some(pointer)) = LocalRevisionPointer::read_from(revision) {
// Remove all sibling directories that are not referenced by the pointer.
for sibling in entry.path().read_dir().map_err(Error::CacheRead)? {
let sibling = sibling.map_err(Error::CacheRead)?;
Expand Down