Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesconnell committed May 7, 2024
1 parent 6099813 commit 221143f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/vector-config/src/external/serde_with.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use std::cell::RefCell;

use vector_config_common::{attributes::CustomAttribute, constants};

use crate::schema::generate_optional_schema;
use crate::{
num::NumberClass,
schema::{generate_number_schema, SchemaGenerator, SchemaObject},
Configurable, GenerateError, Metadata,
};
use crate::schema::generate_optional_schema;

// Blanket implementation of `Configurable` for any `serde_with` helper that is also `Configurable`.
impl<T> Configurable for serde_with::As<T>
Expand Down Expand Up @@ -135,7 +135,10 @@ impl Configurable for serde_with::DurationMilliSeconds<u64, serde_with::formats:
}

impl Configurable for Option<serde_with::DurationMilliSeconds<u64, serde_with::formats::Strict>> {
fn generate_schema(gen: &RefCell<SchemaGenerator>) -> Result<SchemaObject, GenerateError> where Self: Sized {
fn generate_schema(gen: &RefCell<SchemaGenerator>) -> Result<SchemaObject, GenerateError>
where
Self: Sized,
{
generate_optional_schema(&u64::as_configurable_ref(), gen)
}
}

0 comments on commit 221143f

Please sign in to comment.