diff --git a/lib/oxttl/src/lexer.rs b/lib/oxttl/src/lexer.rs index eee7cd60..fd8341a2 100644 --- a/lib/oxttl/src/lexer.rs +++ b/lib/oxttl/src/lexer.rs @@ -57,7 +57,7 @@ impl TokenRecognizer for N3Lexer { data: &'a [u8], is_ending: bool, options: &Self::Options, - ) -> Option<(usize, Result, TokenRecognizerError>)> { + ) -> Option<(usize, Result, TokenRecognizerError>)> { match *data.first()? { b'<' => match *data.get(1)? { b'<' => Some((2, Ok(N3Token::Punctuation("<<")))), diff --git a/lib/oxttl/src/line_formats.rs b/lib/oxttl/src/line_formats.rs index 730da18a..e522bd53 100644 --- a/lib/oxttl/src/line_formats.rs +++ b/lib/oxttl/src/line_formats.rs @@ -54,8 +54,8 @@ impl RuleRecognizer for NQuadsRecognizer { fn recognize_next( mut self, token: N3Token<'_>, - context: &mut Self::Context, - results: &mut Vec, + context: &mut NQuadsRecognizerContext, + results: &mut Vec, errors: &mut Vec, ) -> Self { if let Some(state) = self.stack.pop() { @@ -235,8 +235,8 @@ impl RuleRecognizer for NQuadsRecognizer { fn recognize_end( mut self, - _context: &mut Self::Context, - results: &mut Vec, + _context: &mut NQuadsRecognizerContext, + results: &mut Vec, errors: &mut Vec, ) { match &*self.stack { @@ -255,7 +255,7 @@ impl RuleRecognizer for NQuadsRecognizer { } } - fn lexer_options(context: &Self::Context) -> &N3LexerOptions { + fn lexer_options(context: &NQuadsRecognizerContext) -> &N3LexerOptions { &context.lexer_options } } diff --git a/lib/oxttl/src/n3.rs b/lib/oxttl/src/n3.rs index 516144a3..d4241b7d 100644 --- a/lib/oxttl/src/n3.rs +++ b/lib/oxttl/src/n3.rs @@ -722,8 +722,8 @@ impl RuleRecognizer for N3Recognizer { fn recognize_next( mut self, token: N3Token<'_>, - context: &mut Self::Context, - results: &mut Vec, + context: &mut N3RecognizerContext, + results: &mut Vec, errors: &mut Vec, ) -> Self { while let Some(rule) = self.stack.pop() { @@ -1195,7 +1195,7 @@ impl RuleRecognizer for N3Recognizer { fn recognize_end( self, - _state: &mut Self::Context, + _state: &mut N3RecognizerContext, _results: &mut Vec, errors: &mut Vec, ) { @@ -1205,7 +1205,7 @@ impl RuleRecognizer for N3Recognizer { } } - fn lexer_options(context: &Self::Context) -> &N3LexerOptions { + fn lexer_options(context: &N3RecognizerContext) -> &N3LexerOptions { &context.lexer_options } } diff --git a/lib/oxttl/src/terse.rs b/lib/oxttl/src/terse.rs index d94f742d..7aa3e103 100644 --- a/lib/oxttl/src/terse.rs +++ b/lib/oxttl/src/terse.rs @@ -44,8 +44,8 @@ impl RuleRecognizer for TriGRecognizer { fn recognize_next( mut self, token: N3Token<'_>, - context: &mut Self::Context, - results: &mut Vec, + context: &mut TriGRecognizerContext, + results: &mut Vec, errors: &mut Vec, ) -> Self { if let Some(rule) = self.stack.pop() { @@ -792,7 +792,7 @@ impl RuleRecognizer for TriGRecognizer { fn recognize_end( mut self, - _context: &mut Self::Context, + _context: &mut TriGRecognizerContext, results: &mut Vec, errors: &mut Vec, ) { @@ -821,7 +821,7 @@ impl RuleRecognizer for TriGRecognizer { } } - fn lexer_options(context: &Self::Context) -> &N3LexerOptions { + fn lexer_options(context: &TriGRecognizerContext) -> &N3LexerOptions { &context.lexer_options } }