Skip to content

Commit bea6569

Browse files
authored
use workspace lint configuration (open-telemetry#2674)
1 parent 455ad06 commit bea6569

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ internal-logs = ["opentelemetry-otlp/internal-logs"]
3333
# Keep tonic as the default client
3434
default = ["tonic-client", "internal-logs"]
3535

36+
[lints]
37+
workspace = true

src/metric_helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn fetch_latest_metrics_for_scope(scope_name: &str) -> Result<Value> {
143143
.get("scope")
144144
.and_then(|s| s.get("name"))
145145
.and_then(|name| name.as_str())
146-
.map_or(false, |n| n == scope_name)
146+
== Some(scope_name)
147147
});
148148

149149
// Keep the resource only if it has any matching `ScopeMetrics`

src/test_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ fn init_tracing() {
5555
});
5656
}
5757

58+
#[allow(clippy::await_holding_lock)]
5859
pub async fn start_collector_container() -> Result<()> {
5960
init_tracing();
6061

tests/logs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ mod logtests {
276276
// Client - Tonic, Reqwest-blocking
277277
#[test]
278278
#[cfg(any(feature = "tonic-client", feature = "reqwest-blocking-client"))]
279-
pub fn logs_simple_non_tokio_main_with_init_logs_inside_rt() -> Result<()> {
279+
pub fn logs_simple_non_tokio_main_with_init_logs_inside_rt_blocking() -> Result<()> {
280280
logs_non_tokio_helper(true, true)
281281
}
282282

@@ -295,7 +295,7 @@ mod logtests {
295295
// Client - Reqwest-blocking
296296
#[test]
297297
#[cfg(feature = "reqwest-blocking-client")]
298-
pub fn logs_simple_non_tokio_main_with_init_logs_outsie_rt() -> Result<()> {
298+
pub fn logs_simple_non_tokio_main_with_init_logs_outsie_rt_blocking() -> Result<()> {
299299
logs_non_tokio_helper(true, false)
300300
}
301301

@@ -320,7 +320,7 @@ mod logtests {
320320
#[ignore] // request-blocking client does not work with tokio
321321
#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
322322
#[cfg(feature = "reqwest-blocking-client")]
323-
pub async fn logs_simple_tokio_multi_thread() -> Result<()> {
323+
pub async fn logs_simple_tokio_multi_thread_blocking() -> Result<()> {
324324
logs_tokio_helper(true, false, false).await
325325
}
326326

0 commit comments

Comments
 (0)