Skip to content

Commit

Permalink
Fix fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dfellis committed Feb 23, 2024
1 parent 514c842 commit 85dc8e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
9 changes: 4 additions & 5 deletions src/lntors/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ pub fn from_microstatement(
}
},
}
},
}
Microstatement::Return { value } => match value {
Some(val) => Ok(format!(
"return {}",
from_microstatement(val, scope, program)?
).to_string()),
Some(val) => {
Ok(format!("return {}", from_microstatement(val, scope, program)?).to_string())
}
None => Ok("return".to_string()),
},
}
Expand Down
3 changes: 2 additions & 1 deletion src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,8 @@ fn statement_to_microstatements(
// off the last one, if any exists, to get the final return value. Then we shove
// the other microstatements into the array and the new Return microstatement with
// that last value attached to it.
let mut retval_microstatements = withoperatorslist_to_microstatements(&retval.assignables)?;
let mut retval_microstatements =
withoperatorslist_to_microstatements(&retval.assignables)?;
let value = match retval_microstatements.pop() {
None => None,
Some(v) => Some(Box::new(v)),
Expand Down

0 comments on commit 85dc8e2

Please sign in to comment.