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:
Lukas Kalbertodt
2021-05-16 16:07:36 +02:00
parent b57382f546
commit d11f18e5f0
2 changed files with 6 additions and 13 deletions

View File

@@ -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(|| {

View File

@@ -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`.