(
py: Python,
input: &[u8],
err: std::str::Utf8Error,
)
| 174 | } |
| 175 | |
| 176 | pub fn new_utf8( |
| 177 | py: Python, |
| 178 | input: &[u8], |
| 179 | err: std::str::Utf8Error, |
| 180 | ) -> PyResult<UnicodeDecodeError> { |
| 181 | let pos = err.valid_up_to(); |
| 182 | UnicodeDecodeError::new( |
| 183 | py, |
| 184 | cstr!("utf-8"), |
| 185 | input, |
| 186 | pos..pos + 1, |
| 187 | cstr!("invalid utf-8"), |
| 188 | ) |
| 189 | } |
| 190 | } |
nothing calls this directly
no outgoing calls
no test coverage detected