Skip to content

Commit 3d26191

Browse files
committed
fix lint and simplify
1 parent 13b60e0 commit 3d26191

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

core/src/telemetry/otel.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,20 +317,14 @@ fn default_resource_instance() -> &'static Resource {
317317
}
318318

319319
fn default_resource(override_values: &HashMap<String, String>) -> Resource {
320-
let override_kvs = override_values
321-
.iter()
322-
.map(|(k, v)| KeyValue::new(k.clone(), v.clone()));
323-
let override_resource = Resource::builder_empty()
324-
.with_attributes(override_kvs)
325-
.build();
326320
Resource::builder_empty()
327321
.with_attributes(
328322
default_resource_instance()
329323
.iter()
330324
.map(|(k, v)| KeyValue::new(k.clone(), v.clone())),
331325
)
332326
.with_attributes(
333-
override_resource
327+
override_values
334328
.iter()
335329
.map(|(k, v)| KeyValue::new(k.clone(), v.clone())),
336330
)

tests/integ_tests/metrics_tests.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
use crate::integ_tests::mk_nexus_endpoint;
22
use anyhow::anyhow;
33
use assert_matches::assert_matches;
4-
use std::{
5-
collections::HashMap,
6-
env,
7-
string::ToString,
8-
sync::Arc,
9-
time::Duration,
10-
};
4+
use std::{collections::HashMap, env, string::ToString, sync::Arc, time::Duration};
115
use temporal_client::{
126
REQUEST_LATENCY_HISTOGRAM_NAME, WorkflowClientTrait, WorkflowOptions, WorkflowService,
137
};

0 commit comments

Comments
 (0)