[minor] fix docs (#18834)

This commit is contained in:
flywind
2021-09-11 17:33:52 +08:00
committed by GitHub
parent 6c2f041368
commit 1f68f71ec2

View File

@@ -603,12 +603,10 @@ proc isValid*[A](s: HashSet[A]): bool {.deprecated:
## Returns `true` if the set has been initialized (with `initHashSet proc
## <#initHashSet>`_ or `init proc <#init,HashSet[A]>`_).
##
## **Examples:**
##
## .. code-block ::
## proc savePreferences(options: HashSet[string]) =
## assert options.isValid, "Pass an initialized set!"
## # Do stuff here, may crash in release builds!
runnableExamples:
proc savePreferences(options: HashSet[string]) =
assert options.isValid, "Pass an initialized set!"
# Do stuff here, may crash in release builds!
result = s.data.len > 0