Skip to content

Commit 64525f1

Browse files
authored
don't eagerly construct the format string when calling replaceWith (sorbet#8423)
1 parent 3c8e9ab commit 64525f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/types/types.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ TypePtr Types::unwrapType(const GlobalState &gs, Loc loc, const TypePtr &tp) {
945945
"T.unsafe");
946946
auto locSource = loc.source(gs);
947947
if (locSource.has_value()) {
948-
e.replaceWith("Wrap in `T.unsafe`", loc, fmt::format("T.unsafe({})", locSource.value()));
948+
e.replaceWith("Wrap in `T.unsafe`", loc, "T.unsafe({})", locSource.value());
949949
}
950950
}
951951
}

0 commit comments

Comments
 (0)