Skip to content

Commit

Permalink
Address clippy warning(to_args->toargs)
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Sep 7, 2019
1 parent a82726a commit 4bca0c5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/err.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub enum PyErrValue {
}

impl PyErrValue {
pub fn to_args<T: 'static + PyErrArguments>(value: T) -> Self {
pub fn toargs<T: 'static + PyErrArguments>(value: T) -> Self {
let _ = Python::acquire_gil();
PyErrValue::ToArgs(Box::new(value))
}
Expand Down Expand Up @@ -430,7 +430,7 @@ macro_rules! impl_to_pyerr {

impl std::convert::From<$err> for PyErr {
fn from(err: $err) -> PyErr {
PyErr::from_value::<$pyexc>(PyErrValue::to_args(err))
PyErr::from_value::<$pyexc>(PyErrValue::toargs(err))
}
}
};
Expand All @@ -441,7 +441,7 @@ impl std::convert::From<io::Error> for PyErr {
fn from(err: io::Error) -> PyErr {
macro_rules! err_value {
() => {
PyErrValue::to_args(err)
PyErrValue::toargs(err)
};
}
match err.kind() {
Expand Down Expand Up @@ -480,7 +480,7 @@ impl PyErrArguments for io::Error {

impl<W: 'static + Send + std::fmt::Debug> std::convert::From<std::io::IntoInnerError<W>> for PyErr {
fn from(err: std::io::IntoInnerError<W>) -> PyErr {
PyErr::from_value::<exceptions::OSError>(PyErrValue::to_args(err))
PyErr::from_value::<exceptions::OSError>(PyErrValue::toargs(err))
}
}

Expand Down

0 comments on commit 4bca0c5

Please sign in to comment.