Fix ignored clippy lints (#12160)

# Description
Fixes some ignored clippy lints.

# User-Facing Changes
Changes some signatures and return types to `&dyn Command` instead of
`&Box<dyn Command`, but I believe this is only an internal change.
This commit is contained in:
Ian Manske
2024-03-11 18:46:04 +00:00
committed by GitHub
parent 77379d7b3d
commit 26786a759e
20 changed files with 93 additions and 112 deletions

View File

@ -2346,7 +2346,6 @@ fn join_lines(lines: impl IntoIterator<Item = impl AsRef<str>>) -> String {
}
// util function to easier copy && paste
#[allow(dead_code)]
fn _print_lines(s: &str, w: usize) {
eprintln!("{:#?}", _split_str_by_width(s, w));
}

View File

@ -1,5 +1,5 @@
use nu_test_support::nu;
#[allow(unused_imports)]
#[cfg(feature = "sqlite")]
use nu_test_support::pipeline;
#[test]

View File

@ -183,7 +183,6 @@ fn from_csv_text_with_tab_separator_to_table() {
}
#[test]
#[allow(clippy::needless_raw_string_hashes)]
fn from_csv_text_with_comments_to_table() {
Playground::setup("filter_from_csv_test_5", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContentToBeTrimmed(
@ -377,7 +376,7 @@ fn from_csv_text_with_wrong_type_separator() {
fn table_with_record_error() {
let actual = nu!(pipeline(
r#"
[[a b]; [1 2] [3 {a: 1 b: 2}]]
[[a b]; [1 2] [3 {a: 1 b: 2}]]
| to csv
"#
));

View File

@ -106,7 +106,6 @@ fn from_tsv_text_to_table() {
}
#[test]
#[allow(clippy::needless_raw_string_hashes)]
fn from_tsv_text_with_comments_to_table() {
Playground::setup("filter_from_tsv_test_2", |dirs, sandbox| {
sandbox.with_files(vec![FileWithContentToBeTrimmed(