diff --git a/README.md b/README.md index 9a857f2..0e98be6 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ You can derive the `Model` and `Referencable` traits for your struct. This will ```rust use serde::{Deserialize, Serialize}; -use mongod::Historic; use mongod::Validate; use mongod::Reference; use mongod::derive::{Module, Referencable}; @@ -22,8 +21,8 @@ struct MyStruct { } impl Validate for MyStruct { - async fn validate(&self) -> bool { - true + async fn validate(&self) -> Result<(), String> { + Ok(()) } } ``` @@ -86,12 +85,12 @@ struct YetAnotherStruct { } impl Validate for MyStruct { - async fn validate(&self) -> bool { + async fn validate(&self) -> Result<(), String> { if let Some(other) = self.other { assert_reference_of!(other, OtherStruct, YetAnotherStruct); } - true + Ok(()) } } ```