File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ fn bench_zapper(c: &mut Criterion) {
67
67
68
68
// build up a group of 100 (similar) people
69
69
let mut group = vec ! [ ] ;
70
- for i in 0 ..10000 {
70
+ for i in 0 ..100 {
71
71
group. push ( Person {
72
72
id : 12 + i,
73
73
name : "Bob" . to_string ( ) ,
@@ -93,7 +93,7 @@ fn bench_zapper_par(c: &mut Criterion) {
93
93
provider : "apns" . to_string ( ) ,
94
94
provider_code : 31 ,
95
95
} ;
96
- let mut bytecode = match compile ( template, & env) {
96
+ let bytecode = match compile ( template, & env) {
97
97
Ok ( bc) => bc,
98
98
Err ( err) => {
99
99
eprintln ! ( "error compiling template: {}" , err) ;
@@ -105,7 +105,7 @@ fn bench_zapper_par(c: &mut Criterion) {
105
105
106
106
// build up a group of 100 (similar) people
107
107
let mut group = vec ! [ ] ;
108
- for i in 0 ..10000 {
108
+ for i in 0 ..100 {
109
109
group. push ( Person {
110
110
id : 12 + i,
111
111
name : "Bob" . to_string ( ) ,
Original file line number Diff line number Diff line change 74
74
}
75
75
76
76
/// Renders a template across multiple items in parallel using Rayon with
77
- /// convenient internally-managed buffers, which requires a mutable reference to self .
77
+ /// convenient internally-managed buffers.
78
78
///
79
79
/// NOTE: This function makes serious trade-offs to enable the _maximum_ throughput.
80
80
/// It is far less efficient, and builds up a single buffer containing all results
84
84
/// Only use if total throughput is the sole concern.
85
85
#[ cfg( feature = "rayon" ) ]
86
86
pub fn par_render < ' b , RunnerItem > (
87
- & mut self ,
87
+ & self ,
88
88
runner : & [ RunnerItem ] ,
89
89
output : & mut Write ,
90
90
) -> Result < ( ) , Vec < :: std:: io:: Error > >
You can’t perform that action at this time.
0 commit comments