Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbabcock committed Dec 20, 2023
1 parent 2d05a0b commit fd18568
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/text/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ where
self.buf.position()
}

#[inline(always)]
#[inline]
unsafe fn next_opt(&mut self) -> (Option<Token>, Option<ReaderError>) {
#[derive(Debug)]
enum ParseState {
Expand Down Expand Up @@ -670,7 +670,7 @@ where
/// assert_eq!(reader.read().unwrap(), Token::Unquoted(Scalar::new(b"1444.11.11")));
/// assert!(matches!(reader.read().unwrap_err().kind(), ReaderErrorKind::Eof));
/// ```
#[inline(always)]
#[inline]
pub fn read(&mut self) -> Result<Token, ReaderError> {
// Workaround for borrow checker :(
let s = unsafe { &mut *(self as *mut TokenReader<R>) };
Expand All @@ -691,7 +691,7 @@ where
/// assert_eq!(reader.read().unwrap(), Token::Unquoted(Scalar::new(b"1444.11.11")));
/// assert_eq!(reader.next().unwrap(), None);
/// ```
#[inline(always)]
#[inline]
pub fn next(&mut self) -> Result<Option<Token>, ReaderError> {
match unsafe { self.next_opt() } {
(Some(x), _) => Ok(Some(x)),
Expand Down

0 comments on commit fd18568

Please sign in to comment.