Skip to content

chore: address clippy warnings#67

Merged
duncanpharvey merged 1 commit intomainfrom
duncan-harvey/clippy
Jan 23, 2026
Merged

chore: address clippy warnings#67
duncanpharvey merged 1 commit intomainfrom
duncan-harvey/clippy

Conversation

@duncanpharvey
Copy link
Collaborator

What does this PR do?

Addresses minor clippy warnings.

Motivation

cargo clippy returns no warnings.

Additional Notes

% cargo clippy
    Checking datadog-trace-agent v0.1.0 (/Users/duncan.harvey/go/src/github.com/DataDog/serverless-components/crates/datadog-trace-agent)
warning: you should consider adding a `Default` implementation for `Tags`
  --> crates/datadog-trace-agent/src/config.rs:46:5
   |
46 | /     pub fn new() -> Self {
47 | |         Self {
48 | |             tags: HashMap::new(),
49 | |             function_tags_string: OnceLock::new(),
50 | |         }
51 | |     }
   | |_____^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#new_without_default
   = note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
   |
26 + impl Default for Tags {
27 +     fn default() -> Self {
28 +         Self::new()
29 +     }
30 + }
   |

warning: this function has too many arguments (8/7)
   --> crates/datadog-trace-agent/src/mini_agent.rs:180:5
    |
180 | /     async fn trace_endpoint_handler(
181 | |         config: Arc<config::Config>,
182 | |         req: hyper_migration::HttpRequest,
183 | |         trace_processor: Arc<dyn trace_processor::TraceProcessor + Send + Sync>,
...   |
188 | |         proxy_tx: Sender<ProxyRequest>,
189 | |     ) -> http::Result<hyper_migration::HttpResponse> {
    | |____________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default

warning: useless use of `format!`
   --> crates/datadog-trace-agent/src/trace_processor.rs:107:18
    |
107 |                 &format!("Error processing traces: Payload too large"),
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Error processing traces: Payload too large".to_string()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.91.0/index.html#useless_format
    = note: `#[warn(clippy::useless_format)]` on by default

warning: `datadog-trace-agent` (lib) generated 3 warnings (run `cargo clippy --fix --lib -p datadog-trace-agent` to apply 2 suggestions)
    Checking datadog-serverless-compat v0.1.0 (/Users/duncan.harvey/go/src/github.com/DataDog/serverless-components/crates/datadog-serverless-compat)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.24s

Describe how to test/QA your changes

Run cargo clippy and verify there are no more warnings.

@duncanpharvey duncanpharvey requested a review from a team as a code owner January 22, 2026 19:36
@duncanpharvey duncanpharvey requested review from kathiehuang and nine5two7 and removed request for a team and nine5two7 January 22, 2026 19:36
@duncanpharvey duncanpharvey merged commit 0f1d0b6 into main Jan 23, 2026
26 checks passed
@duncanpharvey duncanpharvey deleted the duncan-harvey/clippy branch January 23, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants