diff options
| author | bors <bors@rust-lang.org> | 2015-06-11 05:05:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-06-11 05:05:20 +0000 |
| commit | 37cf025f1c04b2deab2afe7dd08c1f4fa2cb18d6 (patch) | |
| tree | adb665019434fc36ab8f28af0a55d8a12b88dda6 /src/libcore | |
| parent | 2fbbd54afe4297032f521fa80ed0e5230d6e03e3 (diff) | |
| parent | e87c62fb12e6b02cfc39fc2a16c315615714757a (diff) | |
| download | rust-37cf025f1c04b2deab2afe7dd08c1f4fa2cb18d6.tar.gz rust-37cf025f1c04b2deab2afe7dd08c1f4fa2cb18d6.zip | |
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
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/char.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs index 48d9869f72a..9938c299615 100644 --- a/src/libcore/char.rs +++ b/src/libcore/char.rs @@ -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'), |
