mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 14:40:06 +02:00
Update clippy to check all features (#441)
* Update clippy to check all features * Fix tests * oops
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use super::nu_dataframe::{Column, NuDataFrame};
|
||||
use super::values::{Column, NuDataFrame};
|
||||
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
@ -103,7 +103,7 @@ fn command(
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let df = NuDataFrame::try_from_pipeline(input, call.head.clone())?;
|
||||
let df = NuDataFrame::try_from_pipeline(input, call.head)?;
|
||||
|
||||
let names = ChunkedArray::<Utf8Type>::new_from_opt_slice(
|
||||
"descriptor",
|
||||
|
@ -1,4 +1,4 @@
|
||||
use super::nu_dataframe::{Column, NuDataFrame};
|
||||
use super::values::{Column, NuDataFrame};
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
engine::{Command, EngineState, Stack},
|
||||
@ -60,7 +60,7 @@ fn command(
|
||||
call: &Call,
|
||||
input: PipelineData,
|
||||
) -> Result<PipelineData, ShellError> {
|
||||
let df = NuDataFrame::try_from_pipeline(input, call.head.clone())?;
|
||||
let df = NuDataFrame::try_from_pipeline(input, call.head)?;
|
||||
|
||||
let mut dtypes: Vec<Value> = Vec::new();
|
||||
let names: Vec<Value> = df
|
||||
@ -76,12 +76,12 @@ fn command(
|
||||
|
||||
let dtype_str = dtype.to_string();
|
||||
dtypes.push(Value::String {
|
||||
val: dtype_str.into(),
|
||||
val: dtype_str,
|
||||
span: call.head,
|
||||
});
|
||||
|
||||
Value::String {
|
||||
val: v.to_string().into(),
|
||||
val: v.to_string(),
|
||||
span: call.head,
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,4 @@
|
||||
mod nu_dataframe;
|
||||
mod values;
|
||||
|
||||
mod describe;
|
||||
mod dtypes;
|
||||
|
@ -1,4 +1,4 @@
|
||||
use super::nu_dataframe::NuDataFrame;
|
||||
use super::values::NuDataFrame;
|
||||
use nu_engine::CallExt;
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
|
@ -1,4 +1,4 @@
|
||||
use super::nu_dataframe::{Column, NuDataFrame};
|
||||
use super::values::{Column, NuDataFrame};
|
||||
|
||||
use nu_protocol::{
|
||||
ast::Call,
|
||||
|
@ -531,6 +531,6 @@ pub fn from_parsed_columns(column_values: ColumnMap) -> Result<NuDataFrame, Shel
|
||||
}
|
||||
|
||||
DataFrame::new(df_series)
|
||||
.map(|df| NuDataFrame::new(df))
|
||||
.map(NuDataFrame::new)
|
||||
.map_err(|e| ShellError::LabeledError("Error creating dataframe".into(), e.to_string()))
|
||||
}
|
@ -242,6 +242,7 @@ fn rm_helper(call: &Call, args: RmArgs) -> Vec<Value> {
|
||||
use std::io::Error;
|
||||
result = if trash {
|
||||
trash::delete(&f).map_err(|e: trash::Error| {
|
||||
use std::io::ErrorKind;
|
||||
Error::new(ErrorKind::Other, format!("{:?}", e))
|
||||
})
|
||||
} else if metadata.is_file() {
|
||||
|
Reference in New Issue
Block a user