forked from extern/nushell
Add general refactorings (#3996)
This commit is contained in:
@ -41,7 +41,7 @@ macro_rules! nu {
|
||||
let mut paths = $crate::shell_os_paths();
|
||||
paths.insert(0, test_bins);
|
||||
|
||||
let paths_joined = match std::env::join_paths(paths.iter()) {
|
||||
let paths_joined = match std::env::join_paths(paths) {
|
||||
Ok(all) => all,
|
||||
Err(_) => panic!("Couldn't join paths for PATH var."),
|
||||
};
|
||||
@ -122,7 +122,7 @@ macro_rules! nu_with_plugins {
|
||||
let mut paths = $crate::shell_os_paths();
|
||||
paths.insert(0, test_bins);
|
||||
|
||||
let paths_joined = match std::env::join_paths(paths.iter()) {
|
||||
let paths_joined = match std::env::join_paths(paths) {
|
||||
Ok(all) => all,
|
||||
Err(_) => panic!("Couldn't join paths for PATH var."),
|
||||
};
|
||||
|
@ -103,7 +103,7 @@ impl Executable for Director {
|
||||
if let Some(pipelines) = &self.pipeline {
|
||||
let child = process.stdin.as_mut().expect("Failed to open stdin");
|
||||
|
||||
for pipeline in pipelines.iter() {
|
||||
for pipeline in pipelines {
|
||||
child
|
||||
.write_all(format!("{}\n", pipeline).as_bytes())
|
||||
.expect("Could not write to");
|
||||
|
@ -94,7 +94,7 @@ impl NuProcess {
|
||||
|
||||
let paths = vec![test_bins_path()];
|
||||
|
||||
let paths_joined = match std::env::join_paths(paths.iter()) {
|
||||
let paths_joined = match std::env::join_paths(&paths) {
|
||||
Ok(all) => all,
|
||||
Err(_) => panic!("Couldn't join paths for PATH var."),
|
||||
};
|
||||
|
Reference in New Issue
Block a user