Skip to content

Commit aea77fe

Browse files
committed
docs: Add top-level example
1 parent 175f0a5 commit aea77fe

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@
1515
//! - Deep access into the merged configuration via a path syntax
1616
//! - Deserialization via `serde` of the configuration or any subset defined via a path
1717
//!
18-
//! See the [examples](https://github.com/mehcode/config-rs/tree/master/examples) for
18+
//! # Example
19+
//!
20+
//! ```rust
21+
//! # #[cfg(feature = "toml")] {
22+
#![doc = include_str!("../examples/simple/main.rs")]
23+
//! # }
24+
//! ```
25+
//!
26+
//! See more [examples](https://github.com/mehcode/config-rs/tree/master/examples) for
1927
//! general usage information.
2028
2129
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

0 commit comments

Comments
 (0)