Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,17 @@ impl Default for TelemetryConfig {
}

impl TelemetryConfig {
/// Explicitly enable or disable telemetry for this client.
pub fn set_enabled(&mut self, enabled: bool) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — The new set_enabled / with_enabled methods have no unit test, even though the PR description lists cargo test --lib config::tests as validation. The existing config::tests module (src/config.rs:1603+) covers TokenCacheConfig but adds nothing exercising these new TelemetryConfig methods. Since the stated purpose is a stable source-compatible API that a downstream harness compiles against, a tiny test pinning the behavior (TelemetryConfig::default().with_enabled(true).enabled == true) would guard against regressions during the #389 Option<bool> migration. Low because the methods are trivial pass-throughs.

self.enabled = enabled;
}

/// Builder-style form of [`Self::set_enabled`].
pub fn with_enabled(mut self, enabled: bool) -> Self {
self.set_enabled(enabled);
self
}

#[cfg(test)]
pub(crate) fn with_exporter(
mut self,
Expand Down
Loading