From 7955f7b76c10b516ab829ff5682deffb11f47f9d Mon Sep 17 00:00:00 2001 From: yassun7010 Date: Wed, 8 May 2024 01:35:20 +0900 Subject: [PATCH] chore: refine sample code. --- serde_valid/README.md | 2 +- serde_valid/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/serde_valid/README.md b/serde_valid/README.md index e29f658..2fbf0ad 100644 --- a/serde_valid/README.md +++ b/serde_valid/README.md @@ -82,7 +82,7 @@ struct Data { let err = Data::from_json_value(json!({ "val": 123 })).unwrap_err(); assert_eq!( - err.as_validation_errors().unwrap().to_string(), + err.to_string(), json!({ "errors": [], "properties": { diff --git a/serde_valid/src/lib.rs b/serde_valid/src/lib.rs index 46df01c..3144cb5 100644 --- a/serde_valid/src/lib.rs +++ b/serde_valid/src/lib.rs @@ -82,7 +82,7 @@ //! let err = Data::from_json_value(json!({ "val": 123 })).unwrap_err(); //! //! assert_eq!( -//! err.as_validation_errors().unwrap().to_string(), +//! err.to_string(), //! json!({ //! "errors": [], //! "properties": {