Skip to content

Commit d1bf341

Browse files
connyaySushisource
authored andcommitted
fix lint
1 parent 3d2bfc1 commit d1bf341

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

tests/integ_tests/metrics_tests.rs

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::{
55
collections::HashMap,
66
env,
77
string::ToString,
8-
sync::{Arc, Mutex},
8+
sync::Arc,
99
time::Duration,
1010
};
1111
use temporal_client::{
@@ -60,7 +60,6 @@ use temporal_sdk_core_test_utils::{
6060
get_integ_server_options, get_integ_telem_options, prom_metrics,
6161
};
6262
use tokio::{join, sync::Barrier};
63-
use tracing_subscriber::fmt::MakeWriter;
6463
use url::Url;
6564

6665
pub(crate) async fn get_text(endpoint: String) -> String {
@@ -1111,28 +1110,3 @@ async fn evict_on_complete_does_not_count_as_forced_eviction() {
11111110
// Metric shouldn't show up at all, since it's zero the whole time.
11121111
assert!(!body.contains("temporal_sticky_cache_total_forced_eviction"));
11131112
}
1114-
1115-
struct CapturingWriter {
1116-
buf: Arc<Mutex<Vec<u8>>>,
1117-
}
1118-
1119-
impl MakeWriter<'_> for CapturingWriter {
1120-
type Writer = CapturingHandle;
1121-
1122-
fn make_writer(&self) -> Self::Writer {
1123-
CapturingHandle(self.buf.clone())
1124-
}
1125-
}
1126-
1127-
struct CapturingHandle(Arc<Mutex<Vec<u8>>>);
1128-
1129-
impl std::io::Write for CapturingHandle {
1130-
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
1131-
let mut b = self.0.lock().unwrap();
1132-
b.extend_from_slice(buf);
1133-
Ok(buf.len())
1134-
}
1135-
fn flush(&mut self) -> std::io::Result<()> {
1136-
Ok(())
1137-
}
1138-
}

0 commit comments

Comments
 (0)