Skip to content

Commit 119e39d

Browse files
authored
chore: avoid alloc or fmt when possible
1 parent 285dc92 commit 119e39d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry/src/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ impl StringValue {
268268
impl From<StringValue> for String {
269269
fn from(s: StringValue) -> Self {
270270
match s.0 {
271-
OtelString::Owned(s) => s.to_string(),
272-
OtelString::Static(s) => s.to_string(),
271+
OtelString::Owned(s) => s.into_string(),
272+
OtelString::Static(s) => s.to_owned(),
273273
OtelString::RefCounted(s) => s.to_string(),
274274
}
275275
}

0 commit comments

Comments
 (0)