mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Deprecated str::raw::from_byte
Use `string:raw::from_utf8` instead [breaking-change]
This commit is contained in:
parent
9ec19373af
commit
feeae27a56
@ -598,9 +598,10 @@ pub mod raw {
|
||||
string::raw::from_utf8(v)
|
||||
}
|
||||
|
||||
/// Converts a byte to a string.
|
||||
/// Deprecated. Use `String::from_bytes`
|
||||
#[deprecated = "Use String::from_bytes"]
|
||||
pub unsafe fn from_byte(u: u8) -> String {
|
||||
from_utf8_owned(vec![u])
|
||||
String::from_bytes(vec![u])
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user