validator: fix empty check
This commit is contained in:
parent
f090fd7d68
commit
f220cb62bc
@ -220,7 +220,7 @@ impl std::fmt::Display for StringEmpty{
|
||||
}
|
||||
}
|
||||
fn check_empty(value:&str)->Result<&str,StringEmpty>{
|
||||
value.is_empty().then_some(value).ok_or(StringEmpty)
|
||||
(!value.is_empty()).then_some(value).ok_or(StringEmpty)
|
||||
}
|
||||
|
||||
// check for duplicate objects
|
||||
|
Loading…
x
Reference in New Issue
Block a user