Skip to content

Commit 7955f7b

Browse files
committed
chore: refine sample code.
1 parent 4d7dfb2 commit 7955f7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

serde_valid/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ struct Data {
8282
let err = Data::from_json_value(json!({ "val": 123 })).unwrap_err();
8383

8484
assert_eq!(
85-
err.as_validation_errors().unwrap().to_string(),
85+
err.to_string(),
8686
json!({
8787
"errors": [],
8888
"properties": {

serde_valid/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
//! let err = Data::from_json_value(json!({ "val": 123 })).unwrap_err();
8383
//!
8484
//! assert_eq!(
85-
//! err.as_validation_errors().unwrap().to_string(),
85+
//! err.to_string(),
8686
//! json!({
8787
//! "errors": [],
8888
//! "properties": {

0 commit comments

Comments
 (0)