Skip to content

Commit 650fb9d

Browse files
committed
style: Clarify code intention
1 parent 13255d0 commit 650fb9d

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/cargo/core/resolver/dep_cache.rs

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ impl<'a> RegistryQueryer<'a> {
207207
}
208208
}
209209

210-
let first_version = first_version;
211210
self.version_prefs.sort_summaries(&mut ret, first_version);
212211

213212
let out = Poll::Ready(Rc::new(ret));

src/cargo/util/toml/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ fn normalize_toml(
507507

508508
normalized_toml.badges = original_toml.badges.clone();
509509
} else {
510-
for field in original_toml.requires_package() {
510+
if let Some(field) = original_toml.requires_package().next() {
511511
bail!("this virtual manifest specifies a `{field}` section, which is not allowed");
512512
}
513513
}

0 commit comments

Comments
 (0)