Closed h4cnull closed 7 months ago
#[derive(Serialize)] struct MidType<'a> { body: &'a [u8], raw: &'a [u8] } fn main() { let program = Program::compile("foo.body.contains(1)").unwrap(); let mut context = Context::default(); context.add_variable("foo", MidType { body: &[1,2,3], raw: &[] }).unwrap(); let v = program.execute(&context).unwrap(); println!("{:?}",v); }
the body will be serialized as List[UInt], but the number 1 is Int type. output: Bool(false)
That should have been solved here. Can you try setting your dependency to point to the master branch?
thank you for your reply, issue resolved.
the body will be serialized as List[UInt], but the number 1 is Int type. output: Bool(false)