1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#[doc(hidden)]
pub use toml_example_derive::TomlExample;
pub mod traits;
pub use traits::*;

#[cfg(test)]
mod tests {
    use toml_example::TomlExample;
    use crate as toml_example;

    #[test]
    fn basic() {
        #[derive(TomlExample)]
        struct Config {
            _a: usize,
            _b: String,
        }
        assert_eq!(Config::to_example(), "# Toml example for Config".to_string());
    }
}