Skip to content

Commit 3da3853

Browse files
committed
Use slices as return types
1 parent 60a3cbe commit 3da3853

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

opentelemetry-sdk/src/logs/log_emitter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ impl LoggerProvider {
9292
}
9393

9494
/// Log processors associated with this provider.
95-
pub fn log_processors(&self) -> &Vec<Box<dyn LogProcessor>> {
95+
pub fn log_processors(&self) -> &[Box<dyn LogProcessor>] {
9696
&self.inner.processors
9797
}
9898

opentelemetry-sdk/src/trace/provider.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl TracerProvider {
6262
}
6363

6464
/// Span processors associated with this provider
65-
pub fn span_processors(&self) -> &Vec<Box<dyn SpanProcessor>> {
65+
pub fn span_processors(&self) -> &[Box<dyn SpanProcessor>] {
6666
&self.inner.processors
6767
}
6868

opentelemetry-sdk/src/trace/span.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ impl Span {
219219
data.end_time = opentelemetry::time::now();
220220
}
221221

222-
match provider.span_processors().as_slice() {
222+
match provider.span_processors() {
223223
[] => {}
224224
[processor] => {
225225
processor.on_end(build_export_data(

0 commit comments

Comments
 (0)