diff --git a/crates/pile-config/src/lib.rs b/crates/pile-config/src/lib.rs index 42991ac..944a2e6 100644 --- a/crates/pile-config/src/lib.rs +++ b/crates/pile-config/src/lib.rs @@ -99,7 +99,7 @@ pub struct FieldSpec { pub r#type: FieldType, /// How to find this field in a data entry - pub path: OneOrMany, + pub path: Vec, /// How to post-process this field #[serde(default)] diff --git a/crates/pile-config/src/misc.rs b/crates/pile-config/src/misc.rs index b0adb99..21b3a8b 100644 --- a/crates/pile-config/src/misc.rs +++ b/crates/pile-config/src/misc.rs @@ -1,33 +1,9 @@ -use core::slice; use std::fmt::{Debug, Display}; use std::ops::Deref; use serde::{Deserialize, Serialize}; use smartstring::{LazyCompact, SmartString}; -#[derive(Debug, Clone, Deserialize)] -#[serde(untagged)] -pub enum OneOrMany { - One(T), - Many(Vec), -} - -impl OneOrMany { - pub fn to_vec(self) -> Vec { - match self { - Self::One(x) => vec![x], - Self::Many(x) => x, - } - } - - pub fn as_slice(&self) -> &[T] { - match self { - Self::One(x) => slice::from_ref(x), - Self::Many(x) => &x[..], - } - } -} - // // MARK: Label // diff --git a/crates/pile/src/config/logging.rs b/crates/pile/src/config/logging.rs index ccbbd8f..8a60aca 100644 --- a/crates/pile/src/config/logging.rs +++ b/crates/pile/src/config/logging.rs @@ -53,6 +53,12 @@ impl From for EnvFilter { // Fixed sources format!("html5ever={}", LogLevel::Error), format!("tantivy={}", LogLevel::Error), + format!("aws_smithy_runtime={}", LogLevel::Error), + format!("aws_smithy_http_client={}", LogLevel::Error), + format!("aws_sdk_s3={}", LogLevel::Error), + format!("aws_sigv4={}", LogLevel::Error), + format!("hyper_util={}", LogLevel::Error), + format!("pdf={}", LogLevel::Warn), // Configurable sources format!("pile={}", conf.pile), format!("pile_flac={}", conf.pile_flac),