Make arg eval lazy, remove old arg evaluation code (#3603)

* Remove old argument eval

* Merge main

* fmt

* clippy

* clippy

* clippy
This commit is contained in:
JT
2021-06-11 13:57:01 +12:00
committed by GitHub
parent c4163c3621
commit 8ac572ed27
218 changed files with 448 additions and 1075 deletions

View File

@ -1,10 +1,13 @@
use crate::filesystem::dir_info::{DirBuilder, DirInfo};
use crate::filesystem::path::canonicalize;
use crate::filesystem::utils::FileStructure;
use crate::maybe_text_codec::{MaybeTextCodec, StringOrBinary};
use crate::shell::shell_args::{CdArgs, CopyArgs, LsArgs, MkdirArgs, MvArgs, RemoveArgs};
use crate::shell::Shell;
use crate::{command_args::EvaluatedCommandArgs, BufCodecReader};
use crate::BufCodecReader;
use crate::{
filesystem::dir_info::{DirBuilder, DirInfo},
CommandArgs,
};
use encoding_rs::Encoding;
use nu_data::config::LocalConfigDiff;
use nu_protocol::{CommandAction, ConfigPath, TaggedDictBuilder, Value};
@ -776,7 +779,7 @@ impl Shell for FilesystemShell {
self.path.clone()
}
fn pwd(&self, args: EvaluatedCommandArgs) -> Result<ActionStream, ShellError> {
fn pwd(&self, args: CommandArgs) -> Result<ActionStream, ShellError> {
let path = PathBuf::from(self.path());
let p = match dunce::canonicalize(path.as_path()) {
Ok(p) => p,