Skip to content

Commit

Permalink
fix(webinterface): Call toString on result of `GenericPath.Segment.…
Browse files Browse the repository at this point in the history
…name` to get an actual `string`

Needed for compatibility with vibe.d 0.96.0.
  • Loading branch information
PetarKirov committed Jul 31, 2023
1 parent c68625f commit 838e9c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions source/webinterface.d
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ class WebInterface
@path("/gist/:gist")
void getGist(string _gist)
{
import std.range : front;

// make a request to the public GitHub page to identify the user name
// without running into rate-limiting
auto res = requestHTTP("https://gist.github.com/%s".format(_gist));
Expand All @@ -287,7 +285,7 @@ class WebInterface
string user = "";
auto location = URL(res.headers.get("Location", "https://gist.github.com/run-dlang")).path.bySegment;
if (!location.empty)
user = location.front.name;
user = location.front.name.toString;

getGist(user, _gist);
}
Expand Down

0 comments on commit 838e9c7

Please sign in to comment.