Skip to content

Commit c7bf90f

Browse files
committed
uri & tut3
1 parent 22d321a commit c7bf90f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/tut3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ them into the tree.
225225

226226

227227
```nim test = "nim c $1"
228-
import std/macros
228+
import std/[macros, objectdollar]
229229
230230
type
231231
MyType = object

lib/pure/uri.nim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ type
5454

5555
UriParseError* = object of ValueError
5656

57+
from std/objectdollar import nil
58+
59+
proc `$`*(uri: Uri): string {.inline.} =
60+
objectdollar.`$`(uri)
5761

5862
proc uriParseError*(msg: string) {.noreturn.} =
5963
## Raises a `UriParseError` exception with message `msg`.

0 commit comments

Comments
 (0)