Skip to content

Commit 5a64507

Browse files
committed
address clippy warnings
1 parent 4ecd9fd commit 5a64507

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

crates/datadog-trace-agent/src/mini_agent.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::net::SocketAddr;
1111
use std::sync::Arc;
1212
use std::time::Instant;
1313
use tokio::sync::mpsc::{self, Receiver, Sender};
14-
use tracing::{debug, error, warn};
14+
use tracing::{debug, error};
1515

1616
use crate::http_utils::{log_and_create_http_response, verify_request_content_length};
1717
use crate::proxy_flusher::{ProxyFlusher, ProxyRequest};
@@ -191,14 +191,14 @@ impl MiniAgent {
191191
let sentinel = std::path::Path::new(LAMBDA_LITE_SENTINEL_PATH);
192192
// SAFETY: LAMBDA_LITE_SENTINEL_PATH is a hard-coded absolute path,
193193
// so .parent() always returns Some.
194-
if let Some(parent) = sentinel.parent() {
195-
if let Err(e) = tokio::fs::create_dir_all(parent).await {
196-
error!(
197-
"Could not create parent directory for Lambda Lite sentinel \
194+
if let Some(parent) = sentinel.parent()
195+
&& let Err(e) = tokio::fs::create_dir_all(parent).await
196+
{
197+
error!(
198+
"Could not create parent directory for Lambda Lite sentinel \
198199
file at {}: {}.",
199-
LAMBDA_LITE_SENTINEL_PATH, e
200-
);
201-
}
200+
LAMBDA_LITE_SENTINEL_PATH, e
201+
);
202202
}
203203
if let Err(e) = tokio::fs::write(sentinel, b"").await {
204204
error!(

0 commit comments

Comments
 (0)