Skip to content

Commit 62da8f9

Browse files
authored
Merge pull request #4711 from aleksanderkrauze/improve-builder-str-inner-into-string-implementation
Improve builder::str::inner::Inner::into_string implementation
2 parents ad5d676 + d6e7d46 commit 62da8f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/builder/str.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,10 @@ pub(crate) mod inner {
246246
}
247247

248248
pub(crate) fn into_string(self) -> String {
249-
self.as_str().to_owned()
249+
match self {
250+
Self::Static(s) => s.to_owned(),
251+
Self::Owned(s) => s.into(),
252+
}
250253
}
251254
}
252255
}

0 commit comments

Comments
 (0)