Skip to content

Commit

Permalink
fix: changetoPattern to re to avoid deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
haltcase committed Nov 9, 2020
1 parent 37bcb4a commit cb7cdd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/glob.nim
Expand Up @@ -342,7 +342,7 @@ proc expandGlob (pattern, root: string, ignoreCase: bool): string =

func globToRegex* (pattern: string, isDos = isDosDefault, ignoreCase = isDosDefault): Regex =
## Converts a string glob pattern to a regex pattern.
globToRegexString(pattern, isDos, ignoreCase).toPattern
globToRegexString(pattern, isDos, ignoreCase).re

func splitPattern* (pattern: string): PatternStems =
## Splits the given pattern into two parts: the ``base`` which is the part
Expand Down Expand Up @@ -377,7 +377,7 @@ func glob* (pattern: string, isDos = isDosDefault, ignoreCase = isDosDefault): G
result = Glob(
pattern: pattern,
regexStr: rgx,
regex: rgx.toPattern,
regex: rgx.re,
base: base,
magic: magic
)
Expand Down

0 comments on commit cb7cdd9

Please sign in to comment.