Skip to content

Commit

Permalink
[stdlib] Faster DType.__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 91f0b80 commit db15abe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/src/builtin/dtype.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ struct DType(
Returns:
The representation of the dtype.
"""
return "DType." + str(self)
return String.write("DType.", self)

@always_inline("nodebug")
fn get_value(self) -> __mlir_type.`!kgen.dtype`:
Expand Down

0 comments on commit db15abe

Please sign in to comment.