From a51d45b99d173281724b53524e1c72f2183c7c90 Mon Sep 17 00:00:00 2001 From: JT <547158+jntrnr@users.noreply.github.com> Date: Sun, 30 Jan 2022 16:12:41 -0500 Subject: [PATCH] Ignore clippy's erroneous warnings (#895) --- crates/nu-command/src/filters/lines.rs | 1 + crates/nu-command/src/strings/detect_columns.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/nu-command/src/filters/lines.rs b/crates/nu-command/src/filters/lines.rs index 5173a5df80..a756282bd8 100644 --- a/crates/nu-command/src/filters/lines.rs +++ b/crates/nu-command/src/filters/lines.rs @@ -101,6 +101,7 @@ impl Command for Lines { let split_char = if s.contains("\r\n") { "\r\n" } else { "\n" }; + #[allow(clippy::needless_collect)] let lines = s .split(split_char) .map(|s| s.to_string()) diff --git a/crates/nu-command/src/strings/detect_columns.rs b/crates/nu-command/src/strings/detect_columns.rs index 4bba032ec0..bdd533e78b 100644 --- a/crates/nu-command/src/strings/detect_columns.rs +++ b/crates/nu-command/src/strings/detect_columns.rs @@ -59,6 +59,7 @@ fn detect_columns( let config = stack.get_config()?; let input = input.collect_string("", &config)?; + #[allow(clippy::needless_collect)] let input: Vec<_> = input .lines() .skip(num_rows_to_skip.unwrap_or_default())