@@ -315,7 +315,6 @@ pub struct ReadContext<'a> {
315315 xlang : bool ,
316316 max_dyn_depth : u32 ,
317317 check_struct_version : bool ,
318- max_binary_size : usize ,
319318 max_collection_size : usize ,
320319
321320 // Context-specific fields
@@ -344,7 +343,6 @@ impl<'a> ReadContext<'a> {
344343 xlang : config. xlang ,
345344 max_dyn_depth : config. max_dyn_depth ,
346345 check_struct_version : config. check_struct_version ,
347- max_binary_size : config. max_binary_size ,
348346 max_collection_size : config. max_collection_size ,
349347 reader : Reader :: default ( ) ,
350348 meta_resolver : MetaReaderResolver :: default ( ) ,
@@ -476,17 +474,6 @@ impl<'a> ReadContext<'a> {
476474 self . meta_string_resolver . read_meta_string ( & mut self . reader )
477475 }
478476
479- #[ inline( always) ]
480- pub fn check_binary_size ( & self , byte_len : usize ) -> Result < ( ) , Error > {
481- if byte_len > self . max_binary_size {
482- return Err ( Error :: invalid_data ( format ! (
483- "binary byte length {} exceeds configured limit {}" ,
484- byte_len, self . max_binary_size
485- ) ) ) ;
486- }
487- Ok ( ( ) )
488- }
489-
490477 #[ inline( always) ]
491478 pub fn check_collection_size ( & self , len : usize ) -> Result < ( ) , Error > {
492479 if len > self . max_collection_size {
0 commit comments