rust/hg-cpython/src/filepatterns.rs
changeset 42609 326fdce22fb2
parent 42437 9609430d3625
child 42634 0247601869ba
equal deleted inserted replaced
42608:717686c5e461 42609:326fdce22fb2
     8 
     8 
     9 //! Bindings for the `hg::filepatterns` module provided by the
     9 //! Bindings for the `hg::filepatterns` module provided by the
    10 //! `hg-core` crate. From Python, this will be seen as `rustext.filepatterns`
    10 //! `hg-core` crate. From Python, this will be seen as `rustext.filepatterns`
    11 //! and can be used as replacement for the the pure `filepatterns` Python module.
    11 //! and can be used as replacement for the the pure `filepatterns` Python module.
    12 //!
    12 //!
       
    13 use crate::exceptions::{PatternError, PatternFileError};
    13 use cpython::{
    14 use cpython::{
    14     PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject,
    15     PyBytes, PyDict, PyModule, PyObject, PyResult, PyTuple, Python, ToPyObject,
    15 };
    16 };
    16 use exceptions::{PatternError, PatternFileError};
       
    17 use hg::{build_single_regex, read_pattern_file, LineNumber, PatternTuple};
    17 use hg::{build_single_regex, read_pattern_file, LineNumber, PatternTuple};
    18 
    18 
    19 /// Rust does not like functions with different return signatures.
    19 /// Rust does not like functions with different return signatures.
    20 /// The 3-tuple version is always returned by the hg-core function,
    20 /// The 3-tuple version is always returned by the hg-core function,
    21 /// the (potential) conversion is handled at this level since it is not likely
    21 /// the (potential) conversion is handled at this level since it is not likely