Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danielSanchezQ committed Mar 28, 2024
1 parent b162973 commit 7d46044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rusty_results/prelude.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ def transpose(self) -> "Result[Option[T], E]":
return Ok(self)

def early_return(self) -> T:
# it is safe to unwrap here as we know we are some
raise EarlyReturnException(self)

def __bool__(self) -> bool:
Expand Down Expand Up @@ -942,6 +941,7 @@ def transpose(self) -> Option["Result[T, E]"]:
return cast(Option, self.unwrap()).map(Ok)

def early_return(self) -> T:
# safe to unwrap here as we know it is Ok
return self.unwrap()

def __repr__(self):
Expand Down

0 comments on commit 7d46044

Please sign in to comment.