Skip to content

Commit

Permalink
chore: Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmah309 committed Dec 3, 2024
1 parent 8dacd40 commit 77f8c09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void main() {
Result<String> order(String user, int orderNumber) {
final result =
makeFood(orderNumber).context("Could not order for user: $user.");
if (result case Ok(o:final order)) {
if (result case Ok(o: final order)) {
return Ok("Order of $order is complete for $user");
}
return result;
Expand Down
8 changes: 4 additions & 4 deletions lib/src/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ extension AnyhowResultExtension<S> on Result<S> {
case Err(:final error):
assert(context is! Error, _isAlreadyErrorAssertionMessage);
if (Error.hasStackTrace) {
return Err(
Error._withStackTrace(context, StackTrace.current, parent: error));
return Err(Error._withStackTrace(context, StackTrace.current,
parent: error));
}
return Err(Error(context, parent: error));
}
Expand All @@ -32,8 +32,8 @@ extension AnyhowResultExtension<S> on Result<S> {
final context = fn();
assert(context is! Error, _isAlreadyErrorAssertionMessage);
if (Error.hasStackTrace) {
return Err(
Error._withStackTrace(context, StackTrace.current, parent: error));
return Err(Error._withStackTrace(context, StackTrace.current,
parent: error));
}
return Err(Error(context, parent: error));
}
Expand Down

0 comments on commit 77f8c09

Please sign in to comment.