We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1b97dd commit 55720f5Copy full SHA for 55720f5
1 file changed
src/string.rs
@@ -1,7 +1,7 @@
1
use alloc::{
2
borrow::{Cow, ToOwned},
3
boxed::Box,
4
- string::{String},
+ string::{String, ToString},
5
sync::Arc,
6
};
7
use core::{borrow::Borrow, fmt::Write as _, hash::Hash, str::FromStr};
@@ -319,8 +319,8 @@ impl<LenT: ValidLength> From<FixedString<LenT>> for String {
319
match value.0 {
320
// SAFETY: Self holds the type invariant that the array is UTF-8.
321
FixedStringRepr::Heap(a) => unsafe { String::from_utf8_unchecked(a.into()) },
322
- FixedStringRepr::Inline(a) => a.as_str().into(),
323
- FixedStringRepr::Static(a) => a.as_str().into(),
+ FixedStringRepr::Inline(a) => a.as_str().to_string(),
+ FixedStringRepr::Static(a) => a.as_str().to_string(),
324
}
325
326
0 commit comments