Skip to content

Commit

Permalink
[stdlib] Faster Error.__repr__()
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Saelices <[email protected]>
  • Loading branch information
msaelices committed Nov 7, 2024
1 parent 3c2129f commit 91f0b80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/src/builtin/error.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ struct Error(
Returns:
A printable representation of the error message.
"""
return "Error(" + repr(self._message()) + ")"
return String.write("Error(", repr(self._message()), ")")

# ===-------------------------------------------------------------------===#
# Methods
Expand Down

0 comments on commit 91f0b80

Please sign in to comment.