Update book #736
This commit is contained in:
parent
09be5e0021
commit
167426175f
|
@ -58,9 +58,8 @@ impl MyValidator {
|
|||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl CustomValidator<i32> for MyValidator {
|
||||
async fn check(&self, value: &i32) -> Result<(), String> {
|
||||
fn check(&self, value: &i32) -> Result<(), String> {
|
||||
if *value == self.expect {
|
||||
Ok(())
|
||||
} else {
|
||||
|
|
|
@ -58,9 +58,8 @@ impl MyValidator {
|
|||
}
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl CustomValidator<i32> for MyValidator {
|
||||
async fn check(&self, value: &i32) -> Result<(), String> {
|
||||
fn check(&self, value: &i32) -> Result<(), String> {
|
||||
if *value == self.expect {
|
||||
Ok(())
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue