MCPcopy Create free account
hub / github.com/davidblewett/rure-python / check_size

Method check_size

regex/src/compile.rs:715–723  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

713 }
714
715 fn check_size(&self) -> result::Result<(), Error> {
716 use std::mem::size_of;
717
718 if self.insts.len() * size_of::<Inst>() > self.size_limit {
719 Err(Error::CompiledTooBig(self.size_limit))
720 } else {
721 Ok(())
722 }
723 }
724}
725
726#[derive(Debug)]

Callers 1

cMethod · 0.80

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected