(
self,
len: usize,
vm: &VirtualMachine,
)
| 148 | |
| 149 | impl ByteInnerFindOptions { |
| 150 | pub fn get_value( |
| 151 | self, |
| 152 | len: usize, |
| 153 | vm: &VirtualMachine, |
| 154 | ) -> PyResult<(Vec<u8>, core::ops::Range<usize>)> { |
| 155 | let sub = match self.sub { |
| 156 | Either::A(v) => v.elements.to_vec(), |
| 157 | Either::B(int) => vec![int.as_bigint().byte_or(vm)?], |
| 158 | }; |
| 159 | let range = anystr::adjust_indices(self.start, self.end, len); |
| 160 | Ok((sub, range)) |
| 161 | } |
| 162 | } |
| 163 | |
| 164 | #[derive(FromArgs)] |
no test coverage detected