Skip to content

Commit

Permalink
librustc_lexer: Make nth_char method private
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Nov 4, 2019
1 parent e8b8d2a commit 31735b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_lexer/src/cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit 31735b0

Please sign in to comment.