From b423dc3cd2805f4c274a25238677dca4887e7546 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Mon, 18 Sep 2023 21:14:01 +0700 Subject: [PATCH] clippy: Remove unnecessary call to `into_iter`. The parameter takes `IntoIterator`, so we don't have to call `into_iter` at the call site. --- src/miette_diagnostic.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/miette_diagnostic.rs b/src/miette_diagnostic.rs index 67b75d0..dc0468e 100644 --- a/src/miette_diagnostic.rs +++ b/src/miette_diagnostic.rs @@ -252,7 +252,7 @@ impl MietteDiagnostic { /// ``` pub fn and_labels(mut self, labels: impl IntoIterator) -> Self { let mut all_labels = self.labels.unwrap_or_default(); - all_labels.extend(labels.into_iter()); + all_labels.extend(labels); self.labels = Some(all_labels); self }