diff --git a/README.md b/README.md index 3cfa1ff..4879add 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,8 @@ struct Human { friends: NonEmptyVec, } -fn example_1() -> anyhow::Result<()> { +// In the 1st example, all fields satisfy the rule, causing the conversion from JSON to succeed. +fn get_started_simple_example() -> anyhow::Result<()> { let json = json! {{ "name": "john", "age": 20, @@ -91,6 +92,8 @@ fn get_started_empty_vec_example() -> anyhow::Result<()> { } ``` +--- + # Compose Rules As mentioned earlier, it is possible to combine any rules as long as the target types match. diff --git a/tests/read_me.rs b/tests/read_me.rs index 44a2a76..6081b75 100644 --- a/tests/read_me.rs +++ b/tests/read_me.rs @@ -19,7 +19,7 @@ struct Human { } #[test] -fn example_1() -> anyhow::Result<()> { +fn get_started_simple_example() -> anyhow::Result<()> { let json = json! {{ "name": "john", "age": 20,