Skip to content

Commit

Permalink
I missed one unneeded loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed Feb 3, 2021
1 parent 1d9e675 commit 44012fd
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/cargo/core/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,18 +806,12 @@ fn summary_for_patch(
// No summaries found, try to help the user figure out what is wrong.
if let Some((_locked_patch, locked_id)) = locked {
// Since the locked patch did not match anything, try the unlocked one.
let orig_matches = loop {
match source.query_vec(orig_patch) {
Ok(Poll::Ready(deps)) => {
break Ok(deps);
}
Ok(Poll::Pending) => {
// TODO: dont hot loop for it to be Ready
}
Err(x) => {
break Err(x);
}
let orig_matches = match source.query_vec(orig_patch) {
Ok(Poll::Ready(deps)) => Ok(deps),
Ok(Poll::Pending) => {
return Ok(Poll::Pending);
}
Err(x) => Err(x),
}
.unwrap_or_else(|e| {
log::warn!(
Expand Down

0 comments on commit 44012fd

Please sign in to comment.