Skip to content

Commit

Permalink
chore: remove redundant cfg feature attributes
Browse files Browse the repository at this point in the history
these modules are conditionally included by the same flags in lib
  • Loading branch information
pitoniak32 committed Oct 20, 2024
1 parent b836ece commit 98d3e87
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions opentelemetry-otlp/src/exporter/http/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ mod logs;
mod trace;

/// Configuration of the http transport
#[cfg(any(feature = "http-proto", feature = "http-json"))]
#[derive(Debug)]
#[cfg_attr(
all(
Expand Down Expand Up @@ -380,14 +379,12 @@ fn add_header_from_string(input: &str, headers: &mut HashMap<HeaderName, HeaderV
}

/// Expose interface for modifying builder config.
#[cfg(any(feature = "http-proto", feature = "http-json"))]
pub trait HasHttpConfig {
/// Return a mutable reference to the config within the exporter builders.
fn http_client_config(&mut self) -> &mut HttpConfig;
}

/// Expose interface for modifying builder config.
#[cfg(any(feature = "http-proto", feature = "http-json"))]
impl HasHttpConfig for HttpExporterBuilder {
fn http_client_config(&mut self) -> &mut HttpConfig {
&mut self.http_config
Expand Down
1 change: 0 additions & 1 deletion opentelemetry-otlp/src/exporter/tonic/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,6 @@ mod tests {
}

#[test]
#[cfg(feature = "grpc-tonic")]
fn test_convert_compression() {
#[cfg(feature = "gzip-tonic")]
assert!(tonic::codec::CompressionEncoding::try_from(Compression::Gzip).is_ok());
Expand Down
1 change: 0 additions & 1 deletion opentelemetry-otlp/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ impl<C> MetricsExporterBuilder<C> {
}
}

#[cfg(any(feature = "http-proto", feature = "http-json", feature = "grpc-tonic"))]
pub fn with_temporality(self, temporality: Temporality) -> MetricsExporterBuilder<C> {
MetricsExporterBuilder {
client: self.client,
Expand Down

0 comments on commit 98d3e87

Please sign in to comment.