aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md5
1 files changed, 4 insertions, 1 deletions
diff --git a/README.md b/README.md
index a1d99b2..28c49fa 100644
--- a/README.md
+++ b/README.md
@@ -45,7 +45,10 @@ fn validate_unique_username(username: &str) -> Result<(), ValidationError> {
Ok(())
}
-let errors = signup_data.validate()?;
+match signup_data.validate() {
+ Ok(_) => (),
+ Err(e) => return e;
+};
```
An error has the following structure: