We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e6b883c commit 4b0a9c9Copy full SHA for 4b0a9c9
library/core/src/str/lossy.rs
@@ -12,11 +12,6 @@ pub struct Utf8Lossy {
12
}
13
14
impl Utf8Lossy {
15
- #[must_use]
16
- pub fn from_str(s: &str) -> &Utf8Lossy {
17
- Utf8Lossy::from_bytes(s.as_bytes())
18
- }
19
-
20
#[must_use]
21
pub fn from_bytes(bytes: &[u8]) -> &Utf8Lossy {
22
// SAFETY: Both use the same memory layout, and UTF-8 correctness isn't required.
0 commit comments