diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-05-03 17:14:04 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2018-05-13 17:16:02 +1000 |
| commit | 4465b2fbf3487e8f45e2eee4da187776574febec (patch) | |
| tree | 4a8181eb588ff640050643f2694978c91add3666 /src/libsyntax | |
| parent | 6fc409ed0938cd2f501642abcaa675977fa5035a (diff) | |
| download | rust-4465b2fbf3487e8f45e2eee4da187776574febec.tar.gz rust-4465b2fbf3487e8f45e2eee4da187776574febec.zip | |
Inline `char_at()` and `record_width`.
Because `bump()` is hot.
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/str.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/str.rs b/src/libsyntax/str.rs index d0f47629b10..281861918fd 100644 --- a/src/libsyntax/str.rs +++ b/src/libsyntax/str.rs @@ -8,6 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. +#[inline] pub fn char_at(s: &str, byte: usize) -> char { s[byte..].chars().next().unwrap() } |
