@@ -6,6 +6,7 @@ use std::{
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
#[derive(Default)]
|
||||
struct BufferInner {
|
||||
pub stdout: Vec<u8>,
|
||||
pub stderr: Vec<u8>,
|
||||
@@ -84,14 +85,7 @@ impl Ui for BufferUi {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for BufferInner {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
stdout: Vec::new(),
|
||||
stderr: Vec::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
impl Default for BufferUi {
|
||||
fn default() -> Self {
|
||||
|
@@ -17,7 +17,7 @@ fn test_config_from_current_dir() {
|
||||
let ui = &BufferUi::default();
|
||||
let current_dir = get_test_data_path("cuddle-embed");
|
||||
|
||||
Command::new_from_args(Some(ui), args.into_iter())
|
||||
Command::new_from_args(Some(ui), args)
|
||||
.execute(Some(¤t_dir))
|
||||
.unwrap();
|
||||
|
||||
@@ -33,7 +33,7 @@ fn test_config_from_source_dir() {
|
||||
args.push("--source");
|
||||
args.push(current_dir.to_str().unwrap());
|
||||
|
||||
Command::new_from_args(Some(ui), args.into_iter())
|
||||
Command::new_from_args(Some(ui), args)
|
||||
.execute(None)
|
||||
.unwrap();
|
||||
|
||||
@@ -50,7 +50,7 @@ fn test_config_from_stdin() {
|
||||
args.push(current_dir.to_str().unwrap());
|
||||
args.push("--config-stdin");
|
||||
|
||||
Command::new_from_args_with_stdin(Some(ui), args.into_iter(), || Ok("please".into()))
|
||||
Command::new_from_args_with_stdin(Some(ui), args, || Ok("please".into()))
|
||||
.execute(None)
|
||||
.unwrap();
|
||||
|
||||
@@ -63,7 +63,7 @@ fn test_config_fails_when_not_path_is_set() {
|
||||
let args = get_base_args();
|
||||
let ui = &BufferUi::default();
|
||||
|
||||
let res = Command::new_from_args(Some(ui), args.into_iter()).execute(None);
|
||||
let res = Command::new_from_args(Some(ui), args).execute(None);
|
||||
|
||||
assert!(res.is_err())
|
||||
}
|
||||
|
Reference in New Issue
Block a user