@@ -200,8 +200,12 @@ impl Source for ConcatSource {
200200 . sum ( )
201201 }
202202
203- fn map ( & self , options : & MapOptions ) -> Option < SourceMap > {
204- get_map ( self , options)
203+ fn map (
204+ & self ,
205+ object_pool : & ObjectPool ,
206+ options : & MapOptions ,
207+ ) -> Option < SourceMap > {
208+ get_map ( object_pool, self , options)
205209 }
206210
207211 fn to_writer ( & self , writer : & mut dyn std:: io:: Write ) -> std:: io:: Result < ( ) > {
@@ -231,8 +235,8 @@ impl Eq for ConcatSource {}
231235impl StreamChunks for ConcatSource {
232236 fn stream_chunks < ' a > (
233237 & ' a self ,
234- options : & MapOptions ,
235238 object_pool : & ' a ObjectPool ,
239+ options : & MapOptions ,
236240 on_chunk : OnChunk < ' _ , ' a > ,
237241 on_source : OnSource < ' _ , ' a > ,
238242 on_name : OnName < ' _ , ' a > ,
@@ -241,8 +245,8 @@ impl StreamChunks for ConcatSource {
241245
242246 if children. len ( ) == 1 {
243247 return children[ 0 ] . stream_chunks (
244- options,
245248 object_pool,
249+ options,
246250 on_chunk,
247251 on_source,
248252 on_name,
@@ -267,8 +271,8 @@ impl StreamChunks for ConcatSource {
267271 generated_line,
268272 generated_column,
269273 } = item. stream_chunks (
270- options,
271274 object_pool,
275+ options,
272276 & mut |chunk, mapping| {
273277 let line = mapping. generated_line + current_line_offset;
274278 let column = if mapping. generated_line == 1 {
@@ -479,7 +483,9 @@ mod tests {
479483 assert_eq ! ( source. size( ) , 62 ) ;
480484 assert_eq ! ( source. source( ) . into_string_lossy( ) , expected_source) ;
481485 assert_eq ! (
482- source. map( & MapOptions :: new( false ) ) . unwrap( ) ,
486+ source
487+ . map( & ObjectPool :: default ( ) , & MapOptions :: new( false ) )
488+ . unwrap( ) ,
483489 SourceMap :: from_json(
484490 r#"{
485491 "version": 3,
@@ -495,7 +501,9 @@ mod tests {
495501 . unwrap( )
496502 ) ;
497503 assert_eq ! (
498- source. map( & MapOptions :: default ( ) ) . unwrap( ) ,
504+ source
505+ . map( & ObjectPool :: default ( ) , & MapOptions :: default ( ) )
506+ . unwrap( ) ,
499507 SourceMap :: from_json(
500508 r#"{
501509 "version": 3,
@@ -529,7 +537,9 @@ mod tests {
529537 assert_eq ! ( source. size( ) , 62 ) ;
530538 assert_eq ! ( source. source( ) . into_string_lossy( ) , expected_source) ;
531539 assert_eq ! (
532- source. map( & MapOptions :: new( false ) ) . unwrap( ) ,
540+ source
541+ . map( & ObjectPool :: default ( ) , & MapOptions :: new( false ) )
542+ . unwrap( ) ,
533543 SourceMap :: from_json(
534544 r#"{
535545 "version": 3,
@@ -545,7 +555,9 @@ mod tests {
545555 . unwrap( )
546556 ) ;
547557 assert_eq ! (
548- source. map( & MapOptions :: default ( ) ) . unwrap( ) ,
558+ source
559+ . map( & ObjectPool :: default ( ) , & MapOptions :: default ( ) )
560+ . unwrap( ) ,
549561 SourceMap :: from_json(
550562 r#"{
551563 "version": 3,
@@ -579,7 +591,9 @@ mod tests {
579591 assert_eq ! ( source. size( ) , 62 ) ;
580592 assert_eq ! ( source. source( ) . into_string_lossy( ) , expected_source) ;
581593 assert_eq ! (
582- source. map( & MapOptions :: new( false ) ) . unwrap( ) ,
594+ source
595+ . map( & ObjectPool :: default ( ) , & MapOptions :: new( false ) )
596+ . unwrap( ) ,
583597 SourceMap :: from_json(
584598 r#"{
585599 "version": 3,
@@ -595,7 +609,9 @@ mod tests {
595609 . unwrap( )
596610 ) ;
597611 assert_eq ! (
598- source. map( & MapOptions :: default ( ) ) . unwrap( ) ,
612+ source
613+ . map( & ObjectPool :: default ( ) , & MapOptions :: default ( ) )
614+ . unwrap( ) ,
599615 SourceMap :: from_json(
600616 r#"{
601617 "version": 3,
@@ -647,7 +663,9 @@ mod tests {
647663 assert_eq ! ( source. source( ) . into_string_lossy( ) , expected_source) ;
648664 assert_eq ! ( source. buffer( ) , expected_source. as_bytes( ) ) ;
649665
650- let map = source. map ( & MapOptions :: new ( false ) ) . unwrap ( ) ;
666+ let map = source
667+ . map ( & ObjectPool :: default ( ) , & MapOptions :: new ( false ) )
668+ . unwrap ( ) ;
651669 assert_eq ! ( map, expected_map1) ;
652670
653671 // TODO: test hash
@@ -662,8 +680,9 @@ mod tests {
662680 ] ) ;
663681
664682 let result_text = source. source ( ) ;
665- let result_map = source. map ( & MapOptions :: default ( ) ) ;
666- let result_list_map = source. map ( & MapOptions :: new ( false ) ) ;
683+ let result_map = source. map ( & ObjectPool :: default ( ) , & MapOptions :: default ( ) ) ;
684+ let result_list_map =
685+ source. map ( & ObjectPool :: default ( ) , & MapOptions :: new ( false ) ) ;
667686
668687 assert_eq ! (
669688 result_text. into_string_lossy( ) ,
@@ -687,7 +706,9 @@ mod tests {
687706 ] ) ;
688707
689708 assert_eq ! (
690- source. map( & MapOptions :: default ( ) ) . unwrap( ) ,
709+ source
710+ . map( & ObjectPool :: default ( ) , & MapOptions :: default ( ) )
711+ . unwrap( ) ,
691712 SourceMap :: from_json(
692713 r#"{
693714 "mappings": "AAAA,K,CCAA,M;ADAA;;ACAA",
@@ -713,7 +734,9 @@ mod tests {
713734 RawStringSource :: from ( "c" ) ,
714735 ] ) ;
715736 assert_eq ! ( source. source( ) . into_string_lossy( ) , "abc" ) ;
716- assert ! ( source. map( & MapOptions :: default ( ) ) . is_none( ) ) ;
737+ assert ! ( source
738+ . map( & ObjectPool :: default ( ) , & MapOptions :: default ( ) )
739+ . is_none( ) ) ;
717740 }
718741
719742 #[ test]
0 commit comments