Deprecated str::raw::from_byte

Use `string:raw::from_utf8` instead

[breaking-change]
This commit is contained in:
Adolfo Ochagavía 2014-07-19 12:30:35 +02:00 committed by Alex Crichton
parent 9ec19373af
commit feeae27a56

View File

@ -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]