Skip to content

Commit

Permalink
Merge pull request #390 from vibe-d/formatalloc_safe
Browse files Browse the repository at this point in the history
Make formatAlloc inferred as safe
  • Loading branch information
s-ludwig authored Feb 15, 2024
2 parents 230faa5 + 5d4cf2d commit 965d7c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/vibe/internal/string.d
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ ptrdiff_t matchBracket(string str, bool nested = true)
string formatAlloc(ARGS...)(IAllocator alloc, string fmt, ARGS args)
{
auto app = AllocAppender!string(alloc);
formattedWrite(&app, fmt, args);
return app.data;
formattedWrite(() @trusted { return &app; } (), fmt, args);
return () @trusted { return app.data; } ();
}

/// Special version of icmp() with optimization for ASCII characters
Expand Down

0 comments on commit 965d7c5

Please sign in to comment.