@@ -30,7 +30,7 @@ fn read_event(c: &mut Criterion) {
3030 group. bench_function ( "trim_text = false" , |b| {
3131 b. iter ( || {
3232 let mut r = Reader :: from_str ( SAMPLE ) ;
33- r. check_end_names ( false ) . check_comments ( false ) ;
33+ r. check_end_names ( false ) ;
3434 let mut count = criterion:: black_box ( 0 ) ;
3535 loop {
3636 match r. read_event ( ) {
@@ -49,9 +49,7 @@ fn read_event(c: &mut Criterion) {
4949 group. bench_function ( "trim_text = true" , |b| {
5050 b. iter ( || {
5151 let mut r = Reader :: from_str ( SAMPLE ) ;
52- r. check_end_names ( false )
53- . check_comments ( false )
54- . trim_text ( true ) ;
52+ r. trim_text ( true ) . check_end_names ( false ) ;
5553 let mut count = criterion:: black_box ( 0 ) ;
5654 loop {
5755 match r. read_event ( ) {
@@ -76,7 +74,7 @@ fn read_resolved_event_into(c: &mut Criterion) {
7674 group. bench_function ( "trim_text = false" , |b| {
7775 b. iter ( || {
7876 let mut r = NsReader :: from_str ( SAMPLE ) ;
79- r. check_end_names ( false ) . check_comments ( false ) ;
77+ r. check_end_names ( false ) ;
8078 let mut count = criterion:: black_box ( 0 ) ;
8179 loop {
8280 match r. read_resolved_event ( ) {
@@ -95,9 +93,7 @@ fn read_resolved_event_into(c: &mut Criterion) {
9593 group. bench_function ( "trim_text = true" , |b| {
9694 b. iter ( || {
9795 let mut r = NsReader :: from_str ( SAMPLE ) ;
98- r. check_end_names ( false )
99- . check_comments ( false )
100- . trim_text ( true ) ;
96+ r. trim_text ( true ) . check_end_names ( false ) ;
10197 let mut count = criterion:: black_box ( 0 ) ;
10298 loop {
10399 match r. read_resolved_event ( ) {
@@ -124,9 +120,7 @@ fn one_event(c: &mut Criterion) {
124120 b. iter ( || {
125121 let mut r = Reader :: from_str ( & src) ;
126122 let mut nbtxt = criterion:: black_box ( 0 ) ;
127- r. check_end_names ( false )
128- . check_comments ( false )
129- . trim_text ( true ) ;
123+ r. trim_text ( true ) . check_end_names ( false ) ;
130124 match r. read_event ( ) {
131125 Ok ( Event :: Start ( ref e) ) => nbtxt += e. len ( ) ,
132126 something_else => panic ! ( "Did not expect {:?}" , something_else) ,
@@ -141,9 +135,7 @@ fn one_event(c: &mut Criterion) {
141135 b. iter ( || {
142136 let mut r = Reader :: from_str ( & src) ;
143137 let mut nbtxt = criterion:: black_box ( 0 ) ;
144- r. check_end_names ( false )
145- . check_comments ( false )
146- . trim_text ( true ) ;
138+ r. trim_text ( true ) . check_end_names ( false ) ;
147139 match r. read_event ( ) {
148140 Ok ( Event :: Comment ( e) ) => nbtxt += e. unescape ( ) . unwrap ( ) . len ( ) ,
149141 something_else => panic ! ( "Did not expect {:?}" , something_else) ,
@@ -158,9 +150,7 @@ fn one_event(c: &mut Criterion) {
158150 b. iter ( || {
159151 let mut r = Reader :: from_str ( & src) ;
160152 let mut nbtxt = criterion:: black_box ( 0 ) ;
161- r. check_end_names ( false )
162- . check_comments ( false )
163- . trim_text ( true ) ;
153+ r. trim_text ( true ) . check_end_names ( false ) ;
164154 match r. read_event ( ) {
165155 Ok ( Event :: CData ( ref e) ) => nbtxt += e. len ( ) ,
166156 something_else => panic ! ( "Did not expect {:?}" , something_else) ,
@@ -178,7 +168,7 @@ fn attributes(c: &mut Criterion) {
178168 group. bench_function ( "with_checks = true" , |b| {
179169 b. iter ( || {
180170 let mut r = Reader :: from_str ( PLAYERS ) ;
181- r. check_end_names ( false ) . check_comments ( false ) ;
171+ r. check_end_names ( false ) ;
182172 let mut count = criterion:: black_box ( 0 ) ;
183173 loop {
184174 match r. read_event ( ) {
@@ -199,7 +189,7 @@ fn attributes(c: &mut Criterion) {
199189 group. bench_function ( "with_checks = false" , |b| {
200190 b. iter ( || {
201191 let mut r = Reader :: from_str ( PLAYERS ) ;
202- r. check_end_names ( false ) . check_comments ( false ) ;
192+ r. check_end_names ( false ) ;
203193 let mut count = criterion:: black_box ( 0 ) ;
204194 loop {
205195 match r. read_event ( ) {
@@ -220,7 +210,7 @@ fn attributes(c: &mut Criterion) {
220210 group. bench_function ( "try_get_attribute" , |b| {
221211 b. iter ( || {
222212 let mut r = Reader :: from_str ( PLAYERS ) ;
223- r. check_end_names ( false ) . check_comments ( false ) ;
213+ r. check_end_names ( false ) ;
224214 let mut count = criterion:: black_box ( 0 ) ;
225215 loop {
226216 match r. read_event ( ) {
0 commit comments