rust/hg-pyo3/src/exceptions.rs
changeset 52864 d961e09d3d8c
parent 52863 ab6198160960
equal deleted inserted replaced
52863:ab6198160960 52864:d961e09d3d8c
    50 
    50 
    51 pub fn map_try_lock_error<T>(e: std::sync::TryLockError<T>) -> PyErr {
    51 pub fn map_try_lock_error<T>(e: std::sync::TryLockError<T>) -> PyErr {
    52     PyRuntimeError::new_err(format!("In Rust PyO3 bindings: {e}"))
    52     PyRuntimeError::new_err(format!("In Rust PyO3 bindings: {e}"))
    53 }
    53 }
    54 
    54 
    55 #[allow(unused)]
       
    56 pub fn to_string_value_error<T: Display>(e: T) -> PyErr {
    55 pub fn to_string_value_error<T: Display>(e: T) -> PyErr {
    57     PyValueError::new_err(e.to_string())
    56     PyValueError::new_err(e.to_string())
    58 }
    57 }
    59 
    58 
    60 pub mod mercurial_py_errors {
    59 pub mod mercurial_py_errors {