Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ArunPiduguDD committed Aug 15, 2024
1 parent b0d93fc commit 30217c7
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
1 change: 0 additions & 1 deletion lib/vector-api-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ pub mod test;

pub use client::*;
pub use subscription::*;

12 changes: 9 additions & 3 deletions lib/vector-core/src/event/log_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -817,10 +817,10 @@ impl tracing::field::Visit for LogEvent {

#[cfg(test)]
mod test {
use uuid::Version;
use super::*;
use crate::test_util::open_fixture;
use lookup::event_path;
use uuid::Version;
use vrl::{btreemap, value};

// The following two tests assert that renaming a key has no effect if the
Expand Down Expand Up @@ -1185,10 +1185,16 @@ mod test {
fn metadata_set_unique_uuid_v7_source_event_id() {
// Check if event id is UUID v7
let log1 = LogEvent::default();
assert_eq!(log1.metadata().source_event_id().get_version(), Some(Version::SortRand));
assert_eq!(
log1.metadata().source_event_id().get_version(),
Some(Version::SortRand)
);

// Check if event id is unique on creation
let log2 = LogEvent::default();
assert_ne!(log1.metadata().source_event_id(), log2.metadata().source_event_id());
assert_ne!(
log1.metadata().source_event_id(),
log2.metadata().source_event_id()
);
}
}
12 changes: 6 additions & 6 deletions lib/vector-core/src/event/metadata.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
#![deny(missing_docs)]

use std::{borrow::Cow, collections::BTreeMap, fmt, sync::Arc};
use super::{BatchNotifier, EventFinalizer, EventFinalizers, EventStatus, ObjectMap};
use crate::{
config::{LogNamespace, OutputId},
schema,
};
use lookup::OwnedTargetPath;
use serde::{Deserialize, Serialize};
use std::{borrow::Cow, collections::BTreeMap, fmt, sync::Arc};
use uuid::Uuid;
use vector_common::{byte_size_of::ByteSizeOf, config::ComponentKey, EventDataEq};
use vrl::{
compiler::SecretTarget,
value::{KeyString, Kind, Value},
};
use super::{BatchNotifier, EventFinalizer, EventFinalizers, EventStatus, ObjectMap};
use crate::{
config::{LogNamespace, OutputId},
schema,
};

const DATADOG_API_KEY: &str = "datadog_api_key";
const SPLUNK_HEC_TOKEN: &str = "splunk_hec_token";
Expand Down
2 changes: 1 addition & 1 deletion lib/vector-core/src/event/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ impl From<EventMetadata> for Metadata {
source_type: source_type.map(|s| s.to_string()),
upstream_id: upstream_id.map(|id| id.as_ref().clone()).map(Into::into),
secrets,
source_event_id: source_event_id.into()
source_event_id: source_event_id.into(),
}
}
}
Expand Down

0 comments on commit 30217c7

Please sign in to comment.