Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused Validator.Valid type #2217

Merged
merged 1 commit into from Mar 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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