mirror of
https://github.com/OMGeeky/confique.git
synced 2025-12-31 08:40:18 +01:00
Move File and FileFormat to the crate root
The crate root is not super busy yet, so it's more convenient to have no public sub modules.
This commit is contained in:
@@ -1,12 +1,8 @@
|
||||
//! Types implementing [`Source`], thus representing some source of
|
||||
//! configuration values.
|
||||
|
||||
use std::{ffi::OsStr, fs, io, path::{Path, PathBuf}};
|
||||
|
||||
use crate::{Config, Error, ErrorInner, Partial, Source};
|
||||
|
||||
|
||||
|
||||
impl<C: Config> Source<C> for &Path {
|
||||
fn load(&self) -> Result<C::Partial, Error> {
|
||||
let ext = self.extension().ok_or_else(|| {
|
||||
15
src/lib.rs
15
src/lib.rs
@@ -2,18 +2,15 @@ use std::{ffi::OsString, fmt, path::PathBuf};
|
||||
|
||||
use serde::Deserialize;
|
||||
|
||||
|
||||
pub use serde;
|
||||
pub use confique_macro::Config;
|
||||
|
||||
|
||||
// #[cfg(feature = "doc-example")]
|
||||
// pub mod example;
|
||||
|
||||
#[doc(hidden)]
|
||||
pub mod internal;
|
||||
|
||||
pub mod source;
|
||||
mod file;
|
||||
|
||||
|
||||
pub use serde;
|
||||
pub use confique_macro::Config;
|
||||
pub use self::file::{File, FileFormat};
|
||||
|
||||
|
||||
/// A configuration object that can be deserialized in layers via `serde`.
|
||||
|
||||
Reference in New Issue
Block a user