@@ -13,16 +13,14 @@ use crate::{
1313 linear_map:: LinearMap ,
1414 source:: { Mapping , OriginalLocation } ,
1515 with_indices:: WithIndices ,
16- MapOptions , MemoryPool , Rope , SourceMap ,
16+ MapOptions , Rope , SourceMap ,
1717} ;
1818
1919// Adding this type because sourceContentLine not happy
20- type InnerSourceContentLine < ' context , ' text > = RefCell <
21- LinearMap < OnceCell < Option < Vec < WithIndices < ' context , ' text , Rope < ' text > > > > > > ,
22- > ;
20+ type InnerSourceContentLine < ' text > =
21+ RefCell < LinearMap < OnceCell < Option < Vec < WithIndices < ' text , Rope < ' text > > > > > > > ;
2322
2423pub fn get_map < ' a , S : StreamChunks > (
25- memory_pool : & ' a MemoryPool ,
2624 stream : & ' a S ,
2725 options : & ' a MapOptions ,
2826) -> Option < SourceMap > {
@@ -32,7 +30,6 @@ pub fn get_map<'a, S: StreamChunks>(
3230 let mut names: Vec < String > = Vec :: new ( ) ;
3331
3432 stream. stream_chunks (
35- memory_pool,
3633 & MapOptions {
3734 columns : options. columns ,
3835 final_source : true ,
@@ -74,7 +71,6 @@ pub trait StreamChunks {
7471 /// [StreamChunks] abstraction
7572 fn stream_chunks < ' a > (
7673 & ' a self ,
77- memory_pool : & ' a MemoryPool ,
7874 options : & MapOptions ,
7975 on_chunk : OnChunk < ' _ , ' a > ,
8076 on_source : OnSource < ' _ , ' a > ,
@@ -94,7 +90,6 @@ pub type OnName<'a, 'b> = &'a mut dyn FnMut(u32, Cow<'b, str>);
9490
9591/// Default stream chunks behavior impl, see [webpack-sources streamChunks](https://github.com/webpack/webpack-sources/blob/9f98066311d53a153fdc7c633422a1d086528027/lib/helpers/streamChunks.js#L15-L35).
9692pub fn stream_chunks_default < ' a , S > (
97- memory_pool : & ' a MemoryPool ,
9893 source : S ,
9994 source_map : Option < & ' a SourceMap > ,
10095 options : & MapOptions ,
@@ -107,13 +102,7 @@ where
107102{
108103 if let Some ( map) = source_map {
109104 stream_chunks_of_source_map (
110- memory_pool,
111- source,
112- map,
113- on_chunk,
114- on_source,
115- on_name,
116- options,
105+ source, map, on_chunk, on_source, on_name, options,
117106 )
118107 } else {
119108 stream_chunks_of_raw_source ( source, options, on_chunk, on_source, on_name)
@@ -314,7 +303,6 @@ where
314303}
315304
316305pub fn stream_chunks_of_source_map < ' a , S > (
317- memory_pool : & ' a MemoryPool ,
318306 source : S ,
319307 source_map : & ' a SourceMap ,
320308 on_chunk : OnChunk < ' _ , ' a > ,
@@ -336,12 +324,7 @@ where
336324 columns : true ,
337325 final_source : false ,
338326 } => stream_chunks_of_source_map_full (
339- memory_pool,
340- source,
341- source_map,
342- on_chunk,
343- on_source,
344- on_name,
327+ source, source_map, on_chunk, on_source, on_name,
345328 ) ,
346329 MapOptions {
347330 columns : false ,
@@ -432,7 +415,6 @@ where
432415}
433416
434417fn stream_chunks_of_source_map_full < ' a , S > (
435- memory_pool : & ' a MemoryPool ,
436418 source : S ,
437419 source_map : & ' a SourceMap ,
438420 on_chunk : OnChunk < ' _ , ' a > ,
@@ -443,9 +425,8 @@ where
443425 S : SourceText < ' a > + ' a ,
444426{
445427 let lines = split_into_lines ( & source) ;
446- let line_with_indices_list = lines
447- . map ( |line| WithIndices :: new ( memory_pool, line) )
448- . collect :: < Vec < _ > > ( ) ;
428+ let line_with_indices_list =
429+ lines. map ( |line| WithIndices :: new ( line) ) . collect :: < Vec < _ > > ( ) ;
449430
450431 if line_with_indices_list. is_empty ( ) {
451432 return GeneratedInfo {
@@ -732,7 +713,6 @@ type InnerSourceIndexValueMapping<'a> =
732713
733714#[ allow( clippy:: too_many_arguments) ]
734715pub fn stream_chunks_of_combined_source_map < ' a , S > (
735- memory_pool : & ' a MemoryPool ,
736716 source : S ,
737717 source_map : & ' a SourceMap ,
738718 inner_source_name : & ' a str ,
@@ -798,7 +778,6 @@ where
798778 } ;
799779
800780 stream_chunks_of_source_map (
801- memory_pool,
802781 source. clone ( ) ,
803782 source_map,
804783 & mut |chunk, mapping| {
@@ -854,7 +833,7 @@ where
854833 match inner_source_contents. get ( & inner_source_index) {
855834 Some ( Some ( source_content) ) => Some (
856835 split_into_lines ( source_content)
857- . map ( |line| WithIndices :: new ( memory_pool , line) )
836+ . map ( |line| WithIndices :: new ( line) )
858837 . collect ( ) ,
859838 ) ,
860839 _ => None ,
@@ -954,7 +933,7 @@ where
954933 match inner_source_contents. get ( & inner_source_index) {
955934 Some ( Some ( source_content) ) => Some (
956935 split_into_lines ( source_content)
957- . map ( |line| WithIndices :: new ( memory_pool , line) )
936+ . map ( |line| WithIndices :: new ( line) )
958937 . collect ( ) ,
959938 ) ,
960939 _ => None ,
@@ -1119,7 +1098,6 @@ where
11191098 }
11201099 source_index_mapping. borrow_mut ( ) . insert ( i, -2 ) ;
11211100 stream_chunks_of_source_map (
1122- memory_pool,
11231101 source_content. unwrap ( ) ,
11241102 inner_source_map,
11251103 & mut |chunk, mapping| {
@@ -1217,7 +1195,6 @@ where
12171195}
12181196
12191197pub fn stream_and_get_source_and_map < ' a , S : StreamChunks > (
1220- memory_pool : & ' a MemoryPool ,
12211198 input_source : & ' a S ,
12221199 options : & MapOptions ,
12231200 on_chunk : OnChunk < ' _ , ' a > ,
@@ -1230,7 +1207,6 @@ pub fn stream_and_get_source_and_map<'a, S: StreamChunks>(
12301207 let mut names: Vec < String > = Vec :: new ( ) ;
12311208
12321209 let generated_info = input_source. stream_chunks (
1233- memory_pool,
12341210 options,
12351211 & mut |chunk, mapping| {
12361212 mappings_encoder. encode ( & mapping) ;
0 commit comments