Update book #736

This commit is contained in:
Sunli 2021-12-02 20:22:11 +08:00
parent 09be5e0021
commit 167426175f
2 changed files with 2 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {