InputValueValidator: impl for MustBeZero

This commit is contained in:
Quentin Perez 2020-08-03 14:43:15 +02:00
parent 56cbba8c5b
commit e2aa14c1ad

View File

@ -50,7 +50,7 @@ Here is an example of a custom validator:
```rust
struct MustBeZero {}
impl InputValueValidator for InputValueValidator {
impl InputValueValidator for MustBeZero {
fn is_valid(&self, value: &Value) -> Result<(), String> {
if let Value::Int(n) = value {
if n.as_i64().unwrap() != 0 {