(
zelf: PyObjectRef,
args: DecodeArgs,
vm: &VirtualMachine,
)
| 1132 | } |
| 1133 | |
| 1134 | pub fn bytes_decode( |
| 1135 | zelf: PyObjectRef, |
| 1136 | args: DecodeArgs, |
| 1137 | vm: &VirtualMachine, |
| 1138 | ) -> PyResult<PyStrRef> { |
| 1139 | let DecodeArgs { encoding, errors } = args; |
| 1140 | let encoding = match encoding.as_ref() { |
| 1141 | None => crate::codecs::DEFAULT_ENCODING, |
| 1142 | Some(e) => e.as_str(), |
| 1143 | }; |
| 1144 | vm.state |
| 1145 | .codec_registry |
| 1146 | .decode_text(zelf, encoding, errors, vm) |
| 1147 | } |
| 1148 | |
| 1149 | fn hex_impl_no_sep(bytes: &[u8]) -> String { |
| 1150 | let mut buf: Vec<u8> = vec![0; bytes.len() * 2]; |
no test coverage detected