Skip to content

Commit 4b0a9c9

Browse files
committed
Delete Utf8Lossy::from_str
1 parent e6b883c commit 4b0a9c9

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

library/core/src/str/lossy.rs

-5
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ pub struct Utf8Lossy {
1212
}
1313

1414
impl Utf8Lossy {
15-
#[must_use]
16-
pub fn from_str(s: &str) -> &Utf8Lossy {
17-
Utf8Lossy::from_bytes(s.as_bytes())
18-
}
19-
2015
#[must_use]
2116
pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy {
2217
// SAFETY: Both use the same memory layout, and UTF-8 correctness isn't required.

0 commit comments

Comments
 (0)