Fix compilation failure for --no-default-features

This commit is contained in:
Lukas Kalbertodt
2021-07-27 17:16:06 +02:00
parent cdda7c5303
commit 00dbe4dc0a
2 changed files with 5 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
use std::{net::IpAddr, path::PathBuf};
use confique::{Config, toml::FormatOptions};
use confique::Config;
#[derive(Debug, Config)]
/// A sample configuration for our app.
@@ -37,19 +37,13 @@ struct LogConfig {
fn main() -> Result<(), anyhow::Error> {
println!("TEMPLATE:");
println!("--------------------------------------------------------");
print!("{}", confique::toml::format::<Conf>(FormatOptions::default()));
println!("--------------------------------------------------------");
let r = Conf::builder()
.env()
.file("examples/files/simple.toml")
.file("examples/files/etc/simple.yaml")
.load()?;
println!();
println!("LOADED CONFIGURATION: {:#?}", r);
println!("{:#?}", r);
Ok(())
}

View File

@@ -9,9 +9,11 @@ mod builder;
mod env;
mod error;
mod file;
mod format;
pub mod meta;
#[cfg(any(feature = "toml", feature = "yaml"))]
mod format;
#[cfg(feature = "toml")]
pub mod toml;