mirror of
https://github.com/nushell/nushell.git
synced 2025-06-19 17:38:14 +02:00
Remove unnecessary #[allow]
annots
Reduce the number of lint exceptions that are not necessary with the current state of the code (or more recent toolchain)
This commit is contained in:
parent
17b2bcc125
commit
475664ff9e
@ -55,7 +55,6 @@ impl Command for ColumnsDF {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_collect)]
|
||||
fn command(
|
||||
_engine_state: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
|
@ -56,7 +56,6 @@ impl Command for DataTypes {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_collect)]
|
||||
fn command(
|
||||
_engine_state: &EngineState,
|
||||
_stack: &mut Stack,
|
||||
|
@ -25,7 +25,6 @@ const GLOB_PARAMS: nu_glob::MatchOptions = nu_glob::MatchOptions {
|
||||
#[derive(Clone)]
|
||||
pub struct Cp;
|
||||
|
||||
#[allow(unused_must_use)]
|
||||
impl Command for Cp {
|
||||
fn name(&self) -> &str {
|
||||
"cp"
|
||||
|
@ -20,7 +20,6 @@ const GLOB_PARAMS: nu_glob::MatchOptions = nu_glob::MatchOptions {
|
||||
#[derive(Clone)]
|
||||
pub struct Mv;
|
||||
|
||||
#[allow(unused_must_use)]
|
||||
impl Command for Mv {
|
||||
fn name(&self) -> &str {
|
||||
"mv"
|
||||
|
@ -38,7 +38,6 @@ impl Command for GroupBy {
|
||||
group_by(engine_state, stack, call, input)
|
||||
}
|
||||
|
||||
#[allow(clippy::unwrap_used)]
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![
|
||||
Example {
|
||||
|
@ -35,7 +35,6 @@ impl Command for SplitBy {
|
||||
split_by(engine_state, stack, call, input)
|
||||
}
|
||||
|
||||
#[allow(clippy::unwrap_used)]
|
||||
fn examples(&self) -> Vec<Example> {
|
||||
vec![Example {
|
||||
description: "split items by column named \"lang\"",
|
||||
|
@ -270,15 +270,10 @@ fn get_output_string(
|
||||
|
||||
output_string.push_str("\n|");
|
||||
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
for i in 0..headers.len() {
|
||||
for &col_width in column_widths.iter().take(headers.len()) {
|
||||
if pretty {
|
||||
output_string.push(' ');
|
||||
output_string.push_str(&get_padded_string(
|
||||
String::from("-"),
|
||||
column_widths[i],
|
||||
'-',
|
||||
));
|
||||
output_string.push_str(&get_padded_string(String::from("-"), col_width, '-'));
|
||||
output_string.push(' ');
|
||||
} else {
|
||||
output_string.push('-');
|
||||
|
@ -1,7 +1,6 @@
|
||||
use nu_protocol::{ShellError, Span, Value};
|
||||
use std::cmp::Ordering;
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub enum Reduce {
|
||||
Summation,
|
||||
Product,
|
||||
|
@ -774,7 +774,6 @@ fn convert_to_table(
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
#[allow(clippy::into_iter_on_ref)]
|
||||
fn convert_to_table2<'a>(
|
||||
row_offset: usize,
|
||||
input: impl Iterator<Item = &'a Value> + ExactSizeIterator + Clone,
|
||||
|
@ -863,7 +863,6 @@ fn chars_eq(a: char, b: char, case_sensitive: bool) -> bool {
|
||||
}
|
||||
|
||||
/// Configuration options to modify the behaviour of `Pattern::matches_with(..)`.
|
||||
#[allow(missing_copy_implementations)]
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
|
||||
pub struct MatchOptions {
|
||||
/// Whether or not patterns should be matched in a case-sensitive manner.
|
||||
|
@ -1604,7 +1604,6 @@ pub fn parse_string_interpolation(
|
||||
|
||||
let mut b = start;
|
||||
|
||||
#[allow(clippy::needless_range_loop)]
|
||||
while b != end {
|
||||
if contents[b - start] == b'('
|
||||
&& (if double_quote && (b - start) > 0 {
|
||||
|
@ -606,7 +606,6 @@ fn parse_commandline_args(
|
||||
|
||||
struct NushellCliArgs {
|
||||
redirect_stdin: Option<Spanned<String>>,
|
||||
#[allow(dead_code)]
|
||||
login_shell: Option<Spanned<String>>,
|
||||
interactive_shell: Option<Spanned<String>>,
|
||||
commands: Option<Spanned<String>>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user