Skip to content

Commit

Permalink
fix toString snippet spec links
Browse files Browse the repository at this point in the history
  • Loading branch information
WebFreak001 committed Sep 26, 2022
1 parent c3c6162 commit 4fb7a55
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions workspace-d/source/workspaced/com/snippets/plain.d
Original file line number Diff line number Diff line change
Expand Up @@ -232,15 +232,15 @@ static immutable PlainSnippet[] plainSnippets = [
"string toString() in struct",
"string toString() const @safe pure nothrow {\n\t$0\n}",
"Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
),
PlainSnippet(
[SnippetLevel.type, SnippetLevel.mixinTemplate],
"toStringText",
"string toString() in struct using std.conv:text",
"string toString() const @safe {\n\timport std.conv : text;\n\n\treturn text($0);\n}",
"Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
),
// these don't get added as they are too error-prone (get silently ignored when there is a compilation error inside of them)
// PlainSnippet(
Expand All @@ -250,7 +250,7 @@ static immutable PlainSnippet[] plainSnippets = [
// "void toString(W)(ref W w) {\n\t$0\n}",
// "Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
// ~ "This overload uses an appender as the first argument which allows the developer to avoid concatenation and GC use.\n\n"
// ~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
// ~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
// ),
// PlainSnippet(
// [SnippetLevel.type, SnippetLevel.mixinTemplate],
Expand All @@ -259,23 +259,23 @@ static immutable PlainSnippet[] plainSnippets = [
// "void toString(W)(ref W w, scope const ref FormatSpec fmt) {\n\t$0\n}",
// "Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
// ~ "This overload uses an appender as the first argument which allows the developer to avoid concatenation and GC use.\n\n"
// ~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
// ~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
// ),
PlainSnippet(
[SnippetLevel.type, SnippetLevel.mixinTemplate],
"toStringClass",
"string toString() in class",
"override string toString() const @safe pure nothrow {\n\t$0\n}",
"Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
),
PlainSnippet(
[SnippetLevel.type, SnippetLevel.mixinTemplate],
"toStringTextClass",
"string toString() in class using std.conv:text",
"override string toString() const @safe {\n\timport std.conv : text;\n\n\treturn text($0);\n}",
"Overriding how objects are serialized to strings with std.conv and writeln.\n\n"
~ "Reference: [https://dlang.org/phobos/std_format.html#.formatValue]"
~ "Reference: [https://dlang.org/phobos/std_format_write.html]"
),
PlainSnippet(
[SnippetLevel.type, SnippetLevel.mixinTemplate],
Expand Down

0 comments on commit 4fb7a55

Please sign in to comment.