mirror of
https://github.com/mii443/tokenizers.git
synced 2025-08-23 16:49:27 +00:00
Python - RustFmt
This commit is contained in:
@ -23,6 +23,7 @@ impl std::error::Error for PyError {}
|
||||
pub struct ToPyResult<T>(pub Result<T>);
|
||||
impl<T> std::convert::Into<PyResult<T>> for ToPyResult<T> {
|
||||
fn into(self) -> PyResult<T> {
|
||||
self.0.map_err(|e| { exceptions::Exception::py_err(format!("{}", e)) })
|
||||
self.0
|
||||
.map_err(|e| exceptions::Exception::py_err(format!("{}", e)))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user