Skip to content

Commit

Permalink
cargo formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
scottgerring committed Mar 10, 2025
1 parent 716cee2 commit b35dec4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 15 deletions.
1 change: 0 additions & 1 deletion opentelemetry/src/context/context_store.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

use crate::otel_warn;
#[cfg(feature = "trace")]
use crate::trace::context::SynchronizedSpan;
Expand Down
8 changes: 3 additions & 5 deletions opentelemetry/src/context/future_ext.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use std::pin::Pin;
use std::task::Poll;
use crate::Context;
use futures_core::Stream;
use futures_sink::Sink;
use pin_project_lite::pin_project;
use crate::Context;
use std::pin::Pin;
use std::task::Context as TaskContext;
use std::task::Poll;
impl<T: Sized> FutureExt for T {}

impl<T: std::future::Future> std::future::Future for WithContext<T> {
Expand Down Expand Up @@ -78,8 +78,6 @@ where
}

Check warning on line 78 in opentelemetry/src/context/future_ext.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry/src/context/future_ext.rs#L71-L78

Added lines #L71 - L78 were not covered by tests
}



/// Extension trait allowing futures, streams, and sinks to be traced with a span.
pub trait FutureExt: Sized {
/// Attaches the provided [`Context`] to this type, returning a `WithContext`
Expand Down
7 changes: 1 addition & 6 deletions opentelemetry/src/trace/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ use crate::{
trace::{Span, SpanContext, Status},
Context, ContextGuard, KeyValue,
};
use std::{
borrow::Cow,
error::Error,
sync::Mutex,
};
use std::{borrow::Cow, error::Error, sync::Mutex};

// Re-export for compatability. This used to be contained here.
pub use crate::context::FutureExt;
Expand Down Expand Up @@ -369,4 +365,3 @@ where
{
Context::map_current(|cx| f(cx.span()))
}

4 changes: 1 addition & 3 deletions opentelemetry/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,7 @@ mod tracer;
mod tracer_provider;

pub use self::{
context::{
get_active_span, mark_span_as_active, FutureExt, SpanRef, TraceContextExt
},
context::{get_active_span, mark_span_as_active, FutureExt, SpanRef, TraceContextExt},
span::{Span, SpanKind, Status},
span_context::{SpanContext, TraceState},
tracer::{SamplingDecision, SamplingResult, SpanBuilder, Tracer},
Expand Down

0 comments on commit b35dec4

Please sign in to comment.