Helper: Parse cadata argument (str or bytes)
(
&self,
arg: &Either<PyStrRef, ArgBytesLike>,
vm: &VirtualMachine,
)
| 2169 | |
| 2170 | /// Helper: Parse cadata argument (str or bytes) |
| 2171 | fn parse_cadata_arg( |
| 2172 | &self, |
| 2173 | arg: &Either<PyStrRef, ArgBytesLike>, |
| 2174 | vm: &VirtualMachine, |
| 2175 | ) -> PyResult<Vec<u8>> { |
| 2176 | match arg { |
| 2177 | Either::A(s) => Ok(s.clone().try_into_utf8(vm)?.as_str().as_bytes().to_vec()), |
| 2178 | Either::B(b) => Ok(b.borrow_buf().to_vec()), |
| 2179 | } |
| 2180 | } |
| 2181 | |
| 2182 | /// Helper: Update certificate statistics |
| 2183 | fn update_cert_stats(&self, stats: cert::CertStats) { |
no test coverage detected