Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SachaMorard committed Feb 4, 2025
1 parent 740cd20 commit 4c377c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
10 changes: 2 additions & 8 deletions crates/components-runtime/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,7 @@ impl ComponentsContext {
id: &str,
store: &mut Store<HostState>,
) -> anyhow::Result<DataCollection> {
let instance_pre = self
.components
.data_collection
.get(id);
let instance_pre = self.components.data_collection.get(id);

if instance_pre.is_none() {
return Err(anyhow::anyhow!("component not found: {}", id));
Expand All @@ -114,10 +111,7 @@ impl ComponentsContext {
id: &str,
store: &mut Store<HostState>,
) -> anyhow::Result<ConsentMapping> {
let instance_pre = self
.components
.consent_mapping
.get(id);
let instance_pre = self.components.consent_mapping.get(id);

if instance_pre.is_none() {
return Err(anyhow::anyhow!("component not found: {}", id));
Expand Down
5 changes: 4 additions & 1 deletion crates/components-runtime/src/data_collection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ pub async fn send_events(
}

// get the instance of the component
let instance = match component_ctx.get_data_collection_instance(&cfg.id, &mut store).await {
let instance = match component_ctx
.get_data_collection_instance(&cfg.id, &mut store)
.await
{
Ok(instance) => instance,
Err(err) => {
error!("Failed to get data collection instance. Error: {}", err);
Expand Down
2 changes: 1 addition & 1 deletion crates/server/src/proxy/compute/data_collection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use http::{header, HeaderMap};
use json_comments::StripComments;
use payload::{Consent, EventData, EventType, Payload};
use regex::Regex;
use tracing::{info, error, warn, Instrument};
use tracing::{error, info, warn, Instrument};

use crate::proxy::compute::html::Document;
use crate::proxy::context::incoming::RequestHandle;
Expand Down

0 comments on commit 4c377c3

Please sign in to comment.