Deprecated str::raw::from_byte
Use `string:raw::from_utf8` instead [breaking-change]
This commit is contained in:
parent
9ec19373af
commit
feeae27a56
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue