Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tomoikey committed Oct 23, 2024
1 parent 04af6dd commit 19cffb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ struct Human {
friends: NonEmptyVec<String>,
}

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,
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion tests/read_me.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 19cffb8

Please sign in to comment.