compiler: fix unused_peekable clippy lint
warning: `peek` never called on `Peekable` iterator
--> compiler\rustc_session\src\utils.rs:130:13
|
130 | let mut args = std::env::args_os().map(|arg| arg.to_string_lossy().to_string()).peekable();
| ^^^^
|
= help: consider removing the call to `peekable`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable
warning: `peek` never called on `Peekable` iterator
--> compiler\rustc_trait_selection\src\traits\error_reporting\suggestions.rs:4934:17
|
4934 | let mut bounds = pred.bounds.iter().peekable();
| ^^^^^^
|
= help: consider removing the call to `peekable`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_peekable
This commit is contained in:
@@ -4931,7 +4931,7 @@ fn point_at_assoc_type_restriction<G: EmissionGuarantee>(
|
||||
let hir::WherePredicate::BoundPredicate(pred) = pred else {
|
||||
continue;
|
||||
};
|
||||
let mut bounds = pred.bounds.iter().peekable();
|
||||
let mut bounds = pred.bounds.iter();
|
||||
while let Some(bound) = bounds.next() {
|
||||
let Some(trait_ref) = bound.trait_ref() else {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user