Show More
@@ -15,10 +15,8 b' use crate::exceptions::{PatternError, Pa' | |||
|
15 | 15 | use cpython::{ |
|
16 | 16 | PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject, |
|
17 | 17 | }; |
|
18 | use hg::{ | |
|
19 | build_single_regex, read_pattern_file, utils::files::get_path_from_bytes, | |
|
20 | LineNumber, PatternTuple, | |
|
21 | }; | |
|
18 | use hg::utils::files; | |
|
19 | use hg::{build_single_regex, read_pattern_file, LineNumber, PatternTuple}; | |
|
22 | 20 | use std::path::PathBuf; |
|
23 | 21 | |
|
24 | 22 | /// Rust does not like functions with different return signatures. |
@@ -38,7 +36,7 b' fn read_pattern_file_wrapper(' | |||
|
38 | 36 | source_info: bool, |
|
39 | 37 | ) -> PyResult<PyTuple> { |
|
40 | 38 | let bytes = file_path.extract::<PyBytes>(py)?; |
|
41 | let path = get_path_from_bytes(bytes.data(py)); | |
|
39 | let path = files::get_path_from_bytes(bytes.data(py)); | |
|
42 | 40 | match read_pattern_file(path, warn) { |
|
43 | 41 | Ok((patterns, warnings)) => { |
|
44 | 42 | if source_info { |
General Comments 0
You need to be logged in to leave comments.
Login now