mirror of
https://github.com/sagiegurari/duckscript
synced 2024-10-14 11:53:05 +00:00
lint
This commit is contained in:
parent
249d4aca3a
commit
0998b3dec9
|
@ -19,7 +19,7 @@ fn write_file(reader: &mut dyn Read, target_file: &str) -> Result<(), Error> {
|
|||
loop {
|
||||
let read_size = reader.read(&mut buffer)?;
|
||||
if read_size > 0 {
|
||||
writer.write(&buffer[0..read_size])?;
|
||||
writer.write_all(&buffer[0..read_size])?;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,8 @@ pub(crate) fn eval_with_instructions(
|
|||
} else {
|
||||
match parse(arguments) {
|
||||
Ok(instruction) => {
|
||||
let all_instructions = [&instructions[..], &vec![instruction]].concat();
|
||||
let mut all_instructions = instructions.clone();
|
||||
all_instructions.push(instruction);
|
||||
let (flow_result, flow_output) = eval_instructions(
|
||||
&all_instructions,
|
||||
commands,
|
||||
|
|
Loading…
Reference in a new issue