mirror of
https://github.com/OMGeeky/confique.git
synced 2025-12-31 08:40:18 +01:00
Fix compilation failure for --no-default-features
This commit is contained in:
@@ -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(())
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user