diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-05-17 20:22:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-17 14:22:53 +0200 |
commit | 4e7c70fd7d46b2ad3bd8b0b84a9de54bea9f14fc (patch) | |
tree | 043f3f1ee1d538a2048beac3dbc3440839ccb188 /lib/std | |
parent | b87732b5f13a39b00a82713a465db6c2f0fef40a (diff) | |
download | Nim-4e7c70fd7d46b2ad3bd8b0b84a9de54bea9f14fc.tar.gz |
provides a `$` function for `Path` (#23617)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Diffstat (limited to 'lib/std')
-rw-r--r-- | lib/std/paths.nim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/paths.nim b/lib/std/paths.nim index b488d2fea..ac2e5cea4 100644 --- a/lib/std/paths.nim +++ b/lib/std/paths.nim @@ -25,6 +25,9 @@ export ReadDirEffect, WriteDirEffect type Path* = distinct string +template `$`*(x: Path): string = + string(x) + func `==`*(x, y: Path): bool {.inline.} = ## Compares two paths. ## |