diff options
| author | Igor Aleksanov <popzxc@yandex.ru> | 2019-11-03 12:57:59 +0300 |
|---|---|---|
| committer | Igor Aleksanov <popzxc@yandex.ru> | 2019-11-04 06:27:25 +0300 |
| commit | 31735b02c95510f2e236ebd773b02e84ee6e1a5b (patch) | |
| tree | ea15df849b11043bd989a640122276dd309a10db | |
| parent | e8b8d2a7257b83698f095f51e2f5127176fc8816 (diff) | |
| download | rust-31735b02c95510f2e236ebd773b02e84ee6e1a5b.tar.gz rust-31735b02c95510f2e236ebd773b02e84ee6e1a5b.zip | |
librustc_lexer: Make nth_char method private
| -rw-r--r-- | src/librustc_lexer/src/cursor.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_lexer/src/cursor.rs b/src/librustc_lexer/src/cursor.rs index 13d0b07d98b..ed0911379c4 100644 --- a/src/librustc_lexer/src/cursor.rs +++ b/src/librustc_lexer/src/cursor.rs @@ -41,7 +41,7 @@ impl<'a> Cursor<'a> { /// If requested position doesn't exist, `EOF_CHAR` is returned. /// However, getting `EOF_CHAR` doesn't always mean actual end of file, /// it should be checked with `is_eof` method. - pub(crate) fn nth_char(&self, n: usize) -> char { + fn nth_char(&self, n: usize) -> char { self.chars().nth(n).unwrap_or(EOF_CHAR) } |
