Skip to content

Commit 6713143

Browse files
cijothomasdjc
authored andcommitted
unwrap_or_default
1 parent 19dc93c commit 6713143

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opentelemetry-prometheus/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl ExporterBuilder {
138138
inner: Mutex::new(Default::default()),
139139
};
140140

141-
let registry = self.registry.unwrap_or_else(prometheus::Registry::new);
141+
let registry = self.registry.unwrap_or_default();
142142
registry
143143
.register(Box::new(collector))
144144
.map_err(|e| MetricsError::Other(e.to_string()))?;

0 commit comments

Comments
 (0)