Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Jan 31, 2024
1 parent e7143df commit a19bb58
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions core/engine/src/module/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,9 @@ impl SourceTextModule {
// 5. Assert: module.[[Status]] is one of linked, evaluating-async, or evaluated.
debug_assert!(matches!(
&*self.status.borrow(),
ModuleStatus::Linked { .. } | ModuleStatus::EvaluatingAsync { .. } | ModuleStatus::Evaluated { .. }
ModuleStatus::Linked { .. }
| ModuleStatus::EvaluatingAsync { .. }
| ModuleStatus::Evaluated { .. }
));
// 6. Assert: stack is empty.
assert!(stack.is_empty());
Expand Down Expand Up @@ -1017,7 +1019,9 @@ impl SourceTextModule {
// 2. If module.[[Status]] is either evaluating-async or evaluated, then
match &*self.status.borrow() {
// 3. If module.[[Status]] is evaluating, return index.
ModuleStatus::Evaluating { .. } | ModuleStatus::EvaluatingAsync { .. } => return Ok(index),
ModuleStatus::Evaluating { .. } | ModuleStatus::EvaluatingAsync { .. } => {
return Ok(index)
}
// a. If module.[[EvaluationError]] is empty, return index.
// b. Otherwise, return ? module.[[EvaluationError]].
ModuleStatus::Evaluated { error, .. } => return error.clone().map_or(Ok(index), Err),
Expand Down Expand Up @@ -1739,9 +1743,8 @@ impl SourceTextModule {
environments,
realm,
} = match &*self.status.borrow() {
ModuleStatus::Evaluating { context, .. } | ModuleStatus::EvaluatingAsync { context, .. } => {
context.clone()
}
ModuleStatus::Evaluating { context, .. }
| ModuleStatus::EvaluatingAsync { context, .. } => context.clone(),
_ => unreachable!("`execute` should only be called for evaluating modules."),
};

Expand Down

0 comments on commit a19bb58

Please sign in to comment.