diff options
author | Nadrieril | 2020-03-21 21:42:54 +0000 |
---|---|---|
committer | Nadrieril | 2020-03-31 21:44:01 +0100 |
commit | b0ee39b006ad2ca99bd3dddf06ab0e0dcc966d2f (patch) | |
tree | b40f5c3c22ed578d4477b246552230c0e820b57a /serde_dhall | |
parent | 85e2e8ee5e83dadd05b6974ba6c951350cb97a61 (diff) |
Test README code samples using doc_comment
Diffstat (limited to '')
-rw-r--r-- | serde_dhall/Cargo.toml | 3 | ||||
-rw-r--r-- | serde_dhall/src/lib.rs | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/serde_dhall/Cargo.toml b/serde_dhall/Cargo.toml index 71a9b02..4e3cce7 100644 --- a/serde_dhall/Cargo.toml +++ b/serde_dhall/Cargo.toml @@ -15,3 +15,6 @@ dhall = { version = "=0.4.0", path = "../dhall" } dhall_proc_macros = { version = "=0.4.0", path = "../dhall_proc_macros" } reqwest = { version = "0.10", features = ["blocking"] } url = "2.1" + +[dev-dependencies] +doc-comment = "0.3" diff --git a/serde_dhall/src/lib.rs b/serde_dhall/src/lib.rs index 5b8f470..4250882 100644 --- a/serde_dhall/src/lib.rs +++ b/serde_dhall/src/lib.rs @@ -168,6 +168,9 @@ //! [serde]: https://docs.serde.rs/serde/ //! [serde::Deserialize]: https://docs.serde.rs/serde/trait.Deserialize.html +#[cfg(doctest)] +doc_comment::doctest!("../../README.md"); + mod error; /// Finer-grained control over deserializing Dhall pub mod options; |