mirror of
https://github.com/OMGeeky/confique.git
synced 2026-01-20 10:22:13 +01:00
Change parse_env error type from Debug to impl std::error::Error
This is the more appropriate trait I think and should work well for most real world use cases.
This commit is contained in:
@@ -6,7 +6,7 @@ use confique::{
|
||||
},
|
||||
Config,
|
||||
};
|
||||
use std::{collections::HashSet, num::NonZeroU64, path::PathBuf, str::FromStr};
|
||||
use std::{collections::HashSet, num::NonZeroU64, path::PathBuf, str::FromStr, convert::Infallible};
|
||||
|
||||
#[derive(Debug, Config)]
|
||||
struct Conf {
|
||||
@@ -45,10 +45,7 @@ enum Format {
|
||||
Yaml,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
enum Error {}
|
||||
|
||||
fn parse_formats(input: &str) -> Result<Vec<Format>, Error> {
|
||||
fn parse_formats(input: &str) -> Result<Vec<Format>, Infallible> {
|
||||
let mut result = Vec::new();
|
||||
|
||||
if input.contains("toml") {
|
||||
|
||||
Reference in New Issue
Block a user