diff options
author | Federico Mena Quintero <federico@gnome.org> | 2021-06-07 11:47:42 -0500 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-06-07 18:41:23 +0000 |
commit | 8813da581b611a998b4d950b1ca81915e5b736d3 (patch) | |
tree | ede523efc8d91cbb981aba601c87dccb0f59801b /benches | |
parent | d0d15aac752e4785a31be7ee9e47bab30a046d89 (diff) | |
download | librsvg-8813da581b611a998b4d950b1ca81915e5b736d3.tar.gz |
Have PathBuilder::parse instead of path_parser::parse_path_into_builder
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/542>
Diffstat (limited to 'benches')
-rw-r--r-- | benches/path_parser.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/benches/path_parser.rs b/benches/path_parser.rs index 55f63655..510f44a1 100644 --- a/benches/path_parser.rs +++ b/benches/path_parser.rs @@ -2,8 +2,8 @@ extern crate criterion; use criterion::{black_box, Criterion}; +use librsvg::bench_only::Lexer; use librsvg::bench_only::PathBuilder; -use librsvg::bench_only::{parse_path_into_builder, Lexer}; static INPUT: &'static str = "M10 20 C 30,40 50 60-70,80,90 100,110 120,130,140"; @@ -37,10 +37,10 @@ fn lex_path(input: &str) { fn path_parser(c: &mut Criterion) { c.bench_function("parse path into builder", |b| { let input = black_box(INPUT); - let mut builder = PathBuilder::default(); b.iter(|| { - let _ = parse_path_into_builder(&input, &mut builder); + let mut builder = PathBuilder::default(); + let _ = builder.parse(&input); }); }); |