diff --git a/library/core/src/str/lossy.rs b/library/core/src/str/lossy.rs index 32bd22846e7dd..6ec1c93908fc7 100644 --- a/library/core/src/str/lossy.rs +++ b/library/core/src/str/lossy.rs @@ -12,11 +12,6 @@ pub struct Utf8Lossy { } impl Utf8Lossy { - #[must_use] - pub fn from_str(s: &str) -> &Utf8Lossy { - Utf8Lossy::from_bytes(s.as_bytes()) - } - #[must_use] pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy { // SAFETY: Both use the same memory layout, and UTF-8 correctness isn't required.