Use nightly clippy to kill dead code/fix style (#12334)

- **Remove duplicated imports**
- **Remove unused field in `CompletionOptions`**
- **Remove unused struct in `nu-table`**
- **Clarify generic bounds**
- **Simplify a subtrait bound for `ExactSizeIterator`**
- **Use `unwrap_or_default`**
- **Use `Option` directly instead of empty string**
- **Elide unneeded clone in `to html`**
This commit is contained in:
Stefan Holderbach
2024-03-30 02:17:28 +01:00
committed by GitHub
parent ff2aba7ae3
commit e889679d42
17 changed files with 46 additions and 84 deletions

View File

@ -2,7 +2,6 @@ use crate::{
lex::{lex, lex_signature},
lite_parser::{lite_parse, LiteCommand, LitePipeline, LiteRedirection, LiteRedirectionTarget},
parse_keywords::*,
parse_mut,
parse_patterns::parse_pattern,
parse_shape_specs::{parse_shape_name, parse_type, ShapeDescriptorUse},
type_check::{self, math_result_type, type_compatible},
@ -13,8 +12,8 @@ use log::trace;
use nu_engine::DIR_VAR_PARSER_INFO;
use nu_protocol::{
ast::*, engine::StateWorkingSet, eval_const::eval_constant, span, BlockId, DidYouMean, Flag,
ParseError, PositionalArg, Signature, Span, Spanned, SyntaxShape, Type, Unit, VarId,
ENV_VARIABLE_ID, IN_VARIABLE_ID,
ParseError, PositionalArg, Signature, Span, Spanned, SyntaxShape, Type, VarId, ENV_VARIABLE_ID,
IN_VARIABLE_ID,
};
use std::{
collections::{HashMap, HashSet},
@ -23,9 +22,6 @@ use std::{
sync::Arc,
};
#[cfg(feature = "plugin")]
use crate::parse_keywords::parse_register;
pub fn garbage(span: Span) -> Expression {
Expression::garbage(span)
}