Skip to content

Commit

Permalink
fix: get_all now push_str with \n
Browse files Browse the repository at this point in the history
  • Loading branch information
andthattoo committed Jul 21, 2024
1 parent 06bde04 commit 430fba3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/memory/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ impl fmt::Display for MemoryReturnType {
let mut result = String::new();
for entry in entry_vec.iter().flatten() {
result.push_str(&entry.to_string());
result.push_str(" \n"); // Add a newline in between strings
}
write!(f, "{}", result)
}
Expand Down
4 changes: 2 additions & 2 deletions src/program/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,11 @@ impl Executor {
return_string.replace(&process.lhs.unwrap(), &process.rhs.unwrap())
}
PostProcessType::Append => {
if process.lhs.is_none() {
if process.rhs.is_none() {
error!("lhs is required for append post process");
continue;
}
return_string.push_str(&process.lhs.unwrap());
return_string.push_str(&process.rhs.unwrap());
return_string
}
PostProcessType::Prepend => {
Expand Down

0 comments on commit 430fba3

Please sign in to comment.