Skip to content

Commit 79244e4

Browse files
authored
Use FnOnce instead of Fn in contrib APIs (#1292)
1 parent d87fc75 commit 79244e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-contrib/src/trace/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use std::{
3030
/// }
3131
/// ```
3232
pub fn new_span_if_parent_sampled(
33-
builder_fn: impl Fn() -> SpanBuilder,
33+
builder_fn: impl FnOnce() -> SpanBuilder,
3434
tracer: TracerSource<'_>,
3535
) -> Option<Context> {
3636
Context::map_current(|current| {
@@ -64,7 +64,7 @@ pub fn new_span_if_parent_sampled(
6464
/// }
6565
/// ```
6666
pub fn new_span_if_recording(
67-
builder_fn: impl Fn() -> SpanBuilder,
67+
builder_fn: impl FnOnce() -> SpanBuilder,
6868
tracer: TracerSource<'_>,
6969
) -> Option<Context> {
7070
Context::map_current(|current| {

0 commit comments

Comments
 (0)