Skip to content

Commit

Permalink
[stdlib] Simpler stat_result.__repr__() logic
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 db15abe commit 348b434
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions stdlib/src/os/fstat.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ struct stat_result(Stringable, Writable):
Returns:
A string representation of stat_result.
"""
var output = String()
self.write_to(output)
return output
return String.write(self)

fn __repr__(self) -> String:
"""Constructs a representation of stat_result.
Expand Down

0 comments on commit 348b434

Please sign in to comment.