fn into_subtree_with_prefix_not_exact(mut self, prefix: &SliceData, gas_consumer: &mut dyn GasConsumer) -> Result<Self> {
        let bit_len = self.bit_len();
        if bit_len <= prefix.remaining_bits() {
            return Ok(self)
        }
        if let Some(root) = self.data() {
            let mut cursor = LabelReader::new(gas_consumer.load_cell(root.clone())?);
            let (key, rem_prefix) = down_by_tree::<Self>(prefix, &mut cursor, self.bit_len(), gas_consumer)?;
            if rem_prefix.as_ref() == Some(prefix) {
                *self.data_mut() = None;
                return Ok(self)
            }
            let mut remainder = cursor.remainder()?;
            let is_leaf = Self::is_leaf(&mut remainder);
            let root = Self::make_cell_with_label_and_data(key.into_cell()?.into(), self.bit_len(), is_leaf, &remainder)?;
            *self.data_mut() = Some(gas_consumer.finalize_cell(root)?);
        }
        Ok(self)
    }
/// transform to subtree with the maximal common prefix
transform to subtree with the maximal common prefix
transform to subtree with the maximal common prefix
fn into_subtree_with_prefix_not_exact(mut self, prefix: &SliceData, gas_consumer: &mut dyn GasConsumer) -> Result<Self> {
        let bit_len = self.bit_len();
        if bit_len <= prefix.remaining_bits() {
            return Ok(self)
        }
        if let Some(root) = self.data() {
            let mut cursor = LabelReader::new(gas_consumer.load_cell(root.clone())?);
            let (key, rem_prefix) = down_by_tree::<Self>(prefix, &mut cursor, self.bit_len(), gas_consumer)?;
            if rem_prefix.as_ref() == Some(prefix) {
                *self.data_mut() = None;
                return Ok(self)
            }
            let mut remainder = cursor.remainder()?;
            let is_leaf = Self::is_leaf(&mut remainder);
            let root = Self::make_cell_with_label_and_data(key.into_cell()?.into(), self.bit_len(), is_leaf, &remainder)?;
            *self.data_mut() = Some(gas_consumer.finalize_cell(root)?);
        }
        Ok(self)
    }
fn into_subtree_with_prefix_not_exact ( mut self , prefix : & SliceData , gas_consumer : & mut dyn GasConsumer ) -> Result < Self > { let bit_len = self . bit_len ( ) ; if bit_len <= prefix . remaining_bits ( ) { return Ok ( self ) } if let Some ( root ) = self . data ( ) { let mut cursor = LabelReader :: new ( gas_consumer . load_cell ( root . clone ( ) ) ? ) ; let ( key , rem_prefix ) = down_by_tree :: < Self > ( prefix , & mut cursor , self . bit_len ( ) , gas_consumer ) ? ; if rem_prefix . as_ref ( ) == Some ( prefix ) { * self . data_mut ( ) = None ; return Ok ( self ) } let mut remainder = cursor . remainder ( ) ? ; let is_leaf = Self :: is_leaf ( & mut remainder ) ; let root = Self :: make_cell_with_label_and_data ( key . into_cell ( ) ? . into ( ) , self . bit_len ( ) , is_leaf , & remainder ) ? ; * self . data_mut ( ) = Some ( gas_consumer . finalize_cell ( root ) ? ) ; } Ok ( self ) }
transform to subtree with the maximal common prefix
transform to subtree with the maximal common prefix
mut self
prefix
&SliceData
gas_consumer
&mut dyn GasConsumer
mut self
prefix
&SliceData
gas_consumer
&mut dyn GasConsumer