From d5c9a851756b1e84b022c2fbf984137aae68e2c9 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 17 Aug 2023 15:36:38 +0200 Subject: chore: move type param bounds to where clause --- src/machine.rs | 8 +++++--- src/tokenizer.rs | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/machine.rs b/src/machine.rs index e6f439b..c11720d 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -8,9 +8,11 @@ use crate::{reader::Reader, Emitter, Error, Tokenizer}; // Note: This is not implemented as a method on Tokenizer because there's fields on Tokenizer that // should not be available in this method, such as Tokenizer.to_reconsume or the Reader instance #[inline] -pub fn consume>( - slf: &mut Tokenizer, -) -> Result { +pub fn consume(slf: &mut Tokenizer) -> Result +where + R: Reader, + E: Emitter, +{ macro_rules! mutate_character_reference { (* $mul:literal + $x:ident - $sub:literal) => { match slf diff --git a/src/tokenizer.rs b/src/tokenizer.rs index 141efb9..7eb33f7 100644 --- a/src/tokenizer.rs +++ b/src/tokenizer.rs @@ -270,7 +270,11 @@ impl> Tokenizer { } } -impl> Iterator for Tokenizer { +impl Iterator for Tokenizer +where + R: Reader, + E: Emitter, +{ type Item = Result; fn next(&mut self) -> Option { -- cgit v1.2.3