Skip to content

Commit

Permalink
Remove unused Validator.Valid type (vapor#2217)
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyarnold authored and pull[bot] committed Mar 6, 2020
1 parent 41c9551 commit 69e7b90
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions Sources/Vapor/Validation/Validators/Valid.swift
@@ -1,19 +1,12 @@
extension Validator {
/// Validates nothing. Can be used as placeholder to validate successful decoding
public static var valid: Validator<T> {
Valid().validator()
.init { _ in
ValidatorResults.Valid()
}
}

struct Valid { }
}

extension Validator.Valid: ValidatorType {
func validate(_ data: T) -> ValidatorResult {
ValidatorResults.Valid()
}
}


extension ValidatorResults {
/// `ValidatorResult` of a validator that validates that the data is valid`.
public struct Valid {
Expand Down

0 comments on commit 69e7b90

Please sign in to comment.