mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 21:07:58 +02:00
Eliminate some compiler warnings (#1468)
- Unnecessary parentheses - Deprecated `description()` method
This commit is contained in:
@ -680,8 +680,8 @@ fn argument_is_quoted(argument: &str) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
((argument.starts_with('"') && argument.ends_with('"'))
|
||||
|| (argument.starts_with('\'') && argument.ends_with('\'')))
|
||||
(argument.starts_with('"') && argument.ends_with('"'))
|
||||
|| (argument.starts_with('\'') && argument.ends_with('\''))
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
|
@ -2,7 +2,6 @@ use crate::prelude::*;
|
||||
use nu_errors::ShellError;
|
||||
use nu_protocol::{CallInfo, Signature, SyntaxShape, Value};
|
||||
use nu_source::Tagged;
|
||||
use std::error::Error;
|
||||
use std::fs::OpenOptions;
|
||||
use std::path::PathBuf;
|
||||
|
||||
@ -48,7 +47,7 @@ fn touch(args: TouchArgs, _context: &RunnablePerItemContext) -> Result<OutputStr
|
||||
Ok(_) => Ok(OutputStream::empty()),
|
||||
Err(err) => Err(ShellError::labeled_error(
|
||||
"File Error",
|
||||
err.description(),
|
||||
err.to_string(),
|
||||
&args.target.tag,
|
||||
)),
|
||||
}
|
||||
|
Reference in New Issue
Block a user