Skip to content

Commit

Permalink
minor enhancement (use discard, instead of _:)
Browse files Browse the repository at this point in the history
  • Loading branch information
drkameleon committed Nov 9, 2024
1 parent 762a089 commit 1217326
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/validators/date.art
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ define :dateValidator is :validator [
; try converting to date using the format
; and catch any potential errors
return not? throws? [
_: to :date .format:fmt str
discard to :date .format:fmt str
]
]

Expand Down
2 changes: 1 addition & 1 deletion src/validators/floating.art
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define :floatingValidator is :validator [
; based on our own `to` converter
; and catching possible errors with `throws?`
not? throws? [
_: to :floating str
discard to :floating str
]
]

Expand Down
2 changes: 1 addition & 1 deletion src/validators/integer.art
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ define :integerValidator is :validator [
; based on our own `to` converter
; and catching possible errors with `throws?`
not? throws? [
_: to :integer str
discard to :integer str
]
]

Expand Down
2 changes: 1 addition & 1 deletion src/validators/version.art
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ define :versionValidator is :validator [
-> return false

not? throws? [
_: to :version str
discard to :version str
]
]

Expand Down

0 comments on commit 1217326

Please sign in to comment.