Auto merge of #26154 - pmarcelll:master, r=Gankro

Various methods in both libcore/char.rs and librustc_unicode/char.rs were previously marked with #[inline], now every method is marked in char's impl blocks.
Partially fixes #26124.
EDIT: I'm not familiar with pull reqests (yet), apparently Github added my second commit to thit PR...
Fixes #26124
This commit is contained in:
bors 2015-06-11 05:05:20 +00:00
commit 37cf025f1c
3 changed files with 29 additions and 17 deletions

View file

@ -152,10 +152,12 @@ pub trait CharExt {
}
impl CharExt for char {
#[inline]
fn is_digit(self, radix: u32) -> bool {
self.to_digit(radix).is_some()
}
#[inline]
fn to_digit(self, radix: u32) -> Option<u32> {
if radix > 36 {
panic!("to_digit: radix is too high (maximum 36)");
@ -170,10 +172,12 @@ impl CharExt for char {
else { None }
}
#[inline]
fn escape_unicode(self) -> EscapeUnicode {
EscapeUnicode { c: self, state: EscapeUnicodeState::Backslash }
}
#[inline]
fn escape_default(self) -> EscapeDefault {
let init_state = match self {
'\t' => EscapeDefaultState::Backslash('t'),