Skip to content

Commit

Permalink
Fix compile error on old compiler versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-ludwig committed Feb 7, 2024
1 parent c8d9a2d commit 3f8ee3e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/rest-collections/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ class LocalThreadAPI : ThreadAPI {

string[] get()
{
return m_data.threads.keys;
static if (__VERSION__ < 2099) {
// NOTE: .keys is not @safe on older compiler versions
return () @trusted { return m_data.threads.keys; } ();
} else return m_data.threads.keys;
}
}

Expand Down

0 comments on commit 3f8ee3e

Please sign in to comment.