Show More
@@ -13,8 +13,7 b'' | |||||
13 | //! |
|
13 | //! | |
14 | use crate::exceptions::{PatternError, PatternFileError}; |
|
14 | use crate::exceptions::{PatternError, PatternFileError}; | |
15 | use cpython::{ |
|
15 | use cpython::{ | |
16 |
PyBytes, PyDict, PyModule, PyObject, PyResult, |
|
16 | PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject, | |
17 | ToPyObject, |
|
|||
18 | }; |
|
17 | }; | |
19 | use hg::{ |
|
18 | use hg::{ | |
20 | build_single_regex, read_pattern_file, utils::files::get_path_from_bytes, |
|
19 | build_single_regex, read_pattern_file, utils::files::get_path_from_bytes, | |
@@ -66,12 +65,12 b' fn read_pattern_file_wrapper(' | |||||
66 | fn warnings_to_py_bytes( |
|
65 | fn warnings_to_py_bytes( | |
67 | py: Python, |
|
66 | py: Python, | |
68 | warnings: &[(PathBuf, Vec<u8>)], |
|
67 | warnings: &[(PathBuf, Vec<u8>)], | |
69 |
) -> Vec<(Py |
|
68 | ) -> Vec<(PyBytes, PyBytes)> { | |
70 | warnings |
|
69 | warnings | |
71 | .iter() |
|
70 | .iter() | |
72 | .map(|(path, syn)| { |
|
71 | .map(|(path, syn)| { | |
73 | ( |
|
72 | ( | |
74 |
Py |
|
73 | PyBytes::new(py, &path.to_string_lossy().as_bytes()), | |
75 | PyBytes::new(py, syn), |
|
74 | PyBytes::new(py, syn), | |
76 | ) |
|
75 | ) | |
77 | }) |
|
76 | }) |
General Comments 0
You need to be logged in to leave comments.
Login now