source-map-mappings 0.5.0

Parse the `mappings` string from a source map.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![feature(test)]

extern crate source_map_mappings;
extern crate test;

static FIXTURE: &'static [u8] = include_bytes!("./part-of-scala-js-source-map");

#[bench]
fn bench_parse_part_of_scala_js_source_map(b: &mut test::Bencher) {
    b.iter(|| {
        let mut mappings = source_map_mappings::parse_mappings::<()>(FIXTURE).unwrap();
        test::black_box(
            mappings
                .all_generated_locations_for(7, 2, None)
                .count(),
        );
    });
}