##// END OF EJS Templates
py3: send bytes from Rust-created warning patterns...
Raphaël Gomès -
r44096:dc4e74d0 default
parent child Browse files
Show More
@@ -13,8 +13,7 b''
13 13 //!
14 14 use crate::exceptions::{PatternError, PatternFileError};
15 15 use cpython::{
16 PyBytes, PyDict, PyModule, PyObject, PyResult, PyString, PyTuple, Python,
17 ToPyObject,
16 PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject,
18 17 };
19 18 use hg::{
20 19 build_single_regex, read_pattern_file, utils::files::get_path_from_bytes,
@@ -66,12 +65,12 b' fn read_pattern_file_wrapper('
66 65 fn warnings_to_py_bytes(
67 66 py: Python,
68 67 warnings: &[(PathBuf, Vec<u8>)],
69 ) -> Vec<(PyString, PyBytes)> {
68 ) -> Vec<(PyBytes, PyBytes)> {
70 69 warnings
71 70 .iter()
72 71 .map(|(path, syn)| {
73 72 (
74 PyString::new(py, &path.to_string_lossy()),
73 PyBytes::new(py, &path.to_string_lossy().as_bytes()),
75 74 PyBytes::new(py, syn),
76 75 )
77 76 })
General Comments 0
You need to be logged in to leave comments. Login now